singletons 2.2 → 2.3
raw patch · 175 files changed
+15480/−17085 lines, 175 filesdep +singletonsdep +textdep ~Cabaldep ~basedep ~th-desugar
Dependencies added: singletons, text
Dependency ranges changed: Cabal, base, th-desugar
Files
- CHANGES.md +33/−0
- README.md +45/−29
- singletons.cabal +22/−14
- src/Data/Promotion/Prelude.hs +0/−4
- src/Data/Promotion/Prelude/Enum.hs +0/−4
- src/Data/Promotion/Prelude/Function.hs +38/−0
- src/Data/Promotion/Prelude/List/NonEmpty.hs +127/−0
- src/Data/Promotion/Prelude/Num.hs +1/−1
- src/Data/Promotion/TH.hs +1/−1
- src/Data/Singletons.hs +62/−58
- src/Data/Singletons/CustomStar.hs +2/−2
- src/Data/Singletons/Decide.hs +1/−1
- src/Data/Singletons/Deriving/Bounded.hs +1/−1
- src/Data/Singletons/Deriving/Enum.hs +1/−1
- src/Data/Singletons/Deriving/Infer.hs +1/−1
- src/Data/Singletons/Deriving/Ord.hs +1/−1
- src/Data/Singletons/Names.hs +10/−28
- src/Data/Singletons/Partition.hs +26/−10
- src/Data/Singletons/Prelude.hs +1/−1
- src/Data/Singletons/Prelude/Bool.hs +1/−1
- src/Data/Singletons/Prelude/Either.hs +1/−1
- src/Data/Singletons/Prelude/Enum.hs +1/−1
- src/Data/Singletons/Prelude/Eq.hs +2/−3
- src/Data/Singletons/Prelude/Function.hs +115/−0
- src/Data/Singletons/Prelude/Instances.hs +1/−1
- src/Data/Singletons/Prelude/List.hs +9/−3
- src/Data/Singletons/Prelude/List/NonEmpty.hs +555/−0
- src/Data/Singletons/Prelude/List/NonEmpty/Internal.hs +133/−0
- src/Data/Singletons/Prelude/Maybe.hs +1/−2
- src/Data/Singletons/Prelude/Num.hs +2/−2
- src/Data/Singletons/Prelude/Ord.hs +14/−2
- src/Data/Singletons/Prelude/Tuple.hs +1/−1
- src/Data/Singletons/Promote.hs +54/−34
- src/Data/Singletons/Promote/Defun.hs +27/−24
- src/Data/Singletons/Promote/Eq.hs +2/−2
- src/Data/Singletons/Promote/Monad.hs +1/−1
- src/Data/Singletons/Promote/Type.hs +12/−5
- src/Data/Singletons/Single.hs +57/−76
- src/Data/Singletons/Single/Data.hs +16/−4
- src/Data/Singletons/Single/Eq.hs +1/−1
- src/Data/Singletons/Single/Fixity.hs +30/−0
- src/Data/Singletons/Single/Monad.hs +6/−81
- src/Data/Singletons/Single/Type.hs +1/−1
- src/Data/Singletons/SuppressUnusedWarnings.hs +1/−1
- src/Data/Singletons/Syntax.hs +6/−8
- src/Data/Singletons/TH.hs +2/−3
- src/Data/Singletons/TypeLits.hs +31/−5
- src/Data/Singletons/TypeLits/Internal.hs +39/−11
- src/Data/Singletons/TypeRepStar.hs +3/−3
- src/Data/Singletons/Util.hs +15/−1
- tests/SingletonsTestSuite.hs +13/−0
- tests/SingletonsTestSuiteUtils.hs +5/−3
- tests/compile-and-dump/GradingClient/Database.ghc80.template +0/−4907
- tests/compile-and-dump/GradingClient/Database.ghc82.template +4784/−0
- tests/compile-and-dump/GradingClient/Database.hs +1/−1
- tests/compile-and-dump/GradingClient/Main.ghc80.template +0/−162
- tests/compile-and-dump/GradingClient/Main.ghc82.template +123/−0
- tests/compile-and-dump/GradingClient/Main.hs +1/−1
- tests/compile-and-dump/InsertionSort/InsertionSortImp.ghc80.template +0/−240
- tests/compile-and-dump/InsertionSort/InsertionSortImp.ghc82.template +177/−0
- tests/compile-and-dump/InsertionSort/InsertionSortImp.hs +1/−1
- tests/compile-and-dump/Promote/Constructors.ghc80.template +0/−82
- tests/compile-and-dump/Promote/Constructors.ghc82.template +69/−0
- tests/compile-and-dump/Promote/GenDefunSymbols.ghc80.template +0/−47
- tests/compile-and-dump/Promote/GenDefunSymbols.ghc82.template +47/−0
- tests/compile-and-dump/Promote/Newtypes.ghc80.template +0/−42
- tests/compile-and-dump/Promote/Newtypes.ghc82.template +42/−0
- tests/compile-and-dump/Promote/Pragmas.ghc80.template +0/−12
- tests/compile-and-dump/Promote/Pragmas.ghc82.template +12/−0
- tests/compile-and-dump/Promote/Prelude.ghc80.template +0/−17
- tests/compile-and-dump/Promote/Prelude.ghc82.template +17/−0
- tests/compile-and-dump/Promote/T180.ghc82.template +48/−0
- tests/compile-and-dump/Promote/T180.hs +10/−0
- tests/compile-and-dump/Singletons/AsPattern.ghc80.template +0/−387
- tests/compile-and-dump/Singletons/AsPattern.ghc82.template +347/−0
- tests/compile-and-dump/Singletons/BadBoundedDeriving.ghc80.template +0/−3
- tests/compile-and-dump/Singletons/BadBoundedDeriving.ghc82.template +6/−0
- tests/compile-and-dump/Singletons/BadEnumDeriving.ghc80.template +0/−3
- tests/compile-and-dump/Singletons/BadEnumDeriving.ghc82.template +6/−0
- tests/compile-and-dump/Singletons/BoundedDeriving.ghc80.template +0/−259
- tests/compile-and-dump/Singletons/BoundedDeriving.ghc82.template +225/−0
- tests/compile-and-dump/Singletons/BoxUnBox.ghc80.template +0/−48
- tests/compile-and-dump/Singletons/BoxUnBox.ghc82.template +42/−0
- tests/compile-and-dump/Singletons/CaseExpressions.ghc80.template +0/−358
- tests/compile-and-dump/Singletons/CaseExpressions.ghc82.template +273/−0
- tests/compile-and-dump/Singletons/Classes.ghc80.template +0/−657
- tests/compile-and-dump/Singletons/Classes.ghc82.template +529/−0
- tests/compile-and-dump/Singletons/Classes2.ghc80.template +0/−116
- tests/compile-and-dump/Singletons/Classes2.ghc82.template +86/−0
- tests/compile-and-dump/Singletons/Contains.ghc80.template +0/−60
- tests/compile-and-dump/Singletons/Contains.ghc82.template +41/−0
- tests/compile-and-dump/Singletons/DataValues.ghc80.template +0/−102
- tests/compile-and-dump/Singletons/DataValues.ghc82.template +93/−0
- tests/compile-and-dump/Singletons/Empty.ghc80.template +0/−14
- tests/compile-and-dump/Singletons/Empty.ghc82.template +14/−0
- tests/compile-and-dump/Singletons/EnumDeriving.ghc80.template +0/−284
- tests/compile-and-dump/Singletons/EnumDeriving.ghc82.template +188/−0
- tests/compile-and-dump/Singletons/EqInstances.ghc80.template +0/−23
- tests/compile-and-dump/Singletons/EqInstances.ghc82.template +23/−0
- tests/compile-and-dump/Singletons/Error.ghc80.template +0/−35
- tests/compile-and-dump/Singletons/Error.ghc82.template +24/−0
- tests/compile-and-dump/Singletons/Fixity.ghc80.template +0/−75
- tests/compile-and-dump/Singletons/Fixity.ghc82.template +68/−0
- tests/compile-and-dump/Singletons/FunDeps.ghc80.template +0/−96
- tests/compile-and-dump/Singletons/FunDeps.ghc82.template +86/−0
- tests/compile-and-dump/Singletons/HigherOrder.ghc80.template +0/−573
- tests/compile-and-dump/Singletons/HigherOrder.ghc82.template +423/−0
- tests/compile-and-dump/Singletons/LambdaCase.ghc80.template +0/−299
- tests/compile-and-dump/Singletons/LambdaCase.ghc82.template +222/−0
- tests/compile-and-dump/Singletons/Lambdas.ghc80.template +0/−842
- tests/compile-and-dump/Singletons/Lambdas.ghc82.template +704/−0
- tests/compile-and-dump/Singletons/LambdasComprehensive.ghc80.template +0/−81
- tests/compile-and-dump/Singletons/LambdasComprehensive.ghc82.template +71/−0
- tests/compile-and-dump/Singletons/LetStatements.ghc80.template +0/−1032
- tests/compile-and-dump/Singletons/LetStatements.ghc82.template +908/−0
- tests/compile-and-dump/Singletons/Maybe.ghc80.template +0/−63
- tests/compile-and-dump/Singletons/Maybe.ghc82.template +62/−0
- tests/compile-and-dump/Singletons/Nat.ghc80.template +0/−145
- tests/compile-and-dump/Singletons/Nat.ghc82.template +119/−0
- tests/compile-and-dump/Singletons/Operators.ghc80.template +0/−126
- tests/compile-and-dump/Singletons/Operators.ghc82.template +101/−0
- tests/compile-and-dump/Singletons/OrdDeriving.ghc80.template +0/−2913
- tests/compile-and-dump/Singletons/OrdDeriving.ghc82.template +1109/−0
- tests/compile-and-dump/Singletons/PatternMatching.ghc80.template +0/−586
- tests/compile-and-dump/Singletons/PatternMatching.ghc82.template +450/−0
- tests/compile-and-dump/Singletons/PolyKinds.ghc82.template +22/−0
- tests/compile-and-dump/Singletons/PolyKinds.hs +8/−0
- tests/compile-and-dump/Singletons/PolyKindsApp.ghc82.template +12/−0
- tests/compile-and-dump/Singletons/PolyKindsApp.hs +12/−0
- tests/compile-and-dump/Singletons/Records.ghc80.template +0/−59
- tests/compile-and-dump/Singletons/Records.ghc82.template +60/−0
- tests/compile-and-dump/Singletons/ReturnFunc.ghc80.template +0/−95
- tests/compile-and-dump/Singletons/ReturnFunc.ghc82.template +76/−0
- tests/compile-and-dump/Singletons/Sections.ghc80.template +0/−144
- tests/compile-and-dump/Singletons/Sections.ghc82.template +112/−0
- tests/compile-and-dump/Singletons/Star.ghc80.template +0/−575
- tests/compile-and-dump/Singletons/Star.ghc82.template +364/−0
- tests/compile-and-dump/Singletons/T124.ghc80.template +0/−37
- tests/compile-and-dump/Singletons/T124.ghc82.template +29/−0
- tests/compile-and-dump/Singletons/T136.ghc80.template +0/−271
- tests/compile-and-dump/Singletons/T136.ghc82.template +171/−0
- tests/compile-and-dump/Singletons/T136b.ghc80.template +0/−53
- tests/compile-and-dump/Singletons/T136b.ghc82.template +49/−0
- tests/compile-and-dump/Singletons/T145.ghc82.template +30/−0
- tests/compile-and-dump/Singletons/T145.hs +9/−0
- tests/compile-and-dump/Singletons/T153.ghc82.template +0/−0
- tests/compile-and-dump/Singletons/T153.hs +13/−0
- tests/compile-and-dump/Singletons/T157.ghc82.template +0/−0
- tests/compile-and-dump/Singletons/T157.hs +6/−0
- tests/compile-and-dump/Singletons/T159.ghc82.template +181/−0
- tests/compile-and-dump/Singletons/T159.hs +27/−0
- tests/compile-and-dump/Singletons/T166.ghc82.template +11/−0
- tests/compile-and-dump/Singletons/T166.hs +20/−0
- tests/compile-and-dump/Singletons/T167.ghc82.template +149/−0
- tests/compile-and-dump/Singletons/T167.hs +27/−0
- tests/compile-and-dump/Singletons/T172.ghc82.template +30/−0
- tests/compile-and-dump/Singletons/T172.hs +18/−0
- tests/compile-and-dump/Singletons/T175.ghc82.template +45/−0
- tests/compile-and-dump/Singletons/T175.hs +29/−0
- tests/compile-and-dump/Singletons/T176.ghc82.template +137/−0
- tests/compile-and-dump/Singletons/T176.hs +30/−0
- tests/compile-and-dump/Singletons/T178.ghc82.template +161/−0
- tests/compile-and-dump/Singletons/T178.hs +16/−0
- tests/compile-and-dump/Singletons/T29.ghc80.template +0/−127
- tests/compile-and-dump/Singletons/T29.ghc82.template +93/−0
- tests/compile-and-dump/Singletons/T33.ghc80.template +0/−34
- tests/compile-and-dump/Singletons/T33.ghc82.template +32/−0
- tests/compile-and-dump/Singletons/T54.ghc80.template +0/−60
- tests/compile-and-dump/Singletons/T54.ghc82.template +47/−0
- tests/compile-and-dump/Singletons/T78.ghc80.template +0/−42
- tests/compile-and-dump/Singletons/T78.ghc82.template +28/−0
- tests/compile-and-dump/Singletons/TopLevelPatterns.ghc80.template +0/−407
- tests/compile-and-dump/Singletons/TopLevelPatterns.ghc82.template +304/−0
- tests/compile-and-dump/Singletons/Undef.ghc80.template +0/−51
- tests/compile-and-dump/Singletons/Undef.ghc82.template +39/−0
CHANGES.md view
@@ -1,6 +1,39 @@ Changelog for singletons project ================================ +2.3+---+* Documentation clarifiation in `Data.Singletons.TypeLits`, thanks to @ivan-m.++* `Demote` was no longer a convenient way of calling `DemoteRep` and has been+removed. `DemoteRep` has been renamed `Demote`.++* `DemoteRep` is now injective.++* Demoting a `Symbol` now gives `Text`. This is motivated by making `DemoteRep`+ injective. (If `Symbol` demoted to `String`, then there would be a conflict+ between demoting `[Char]` and `Symbol`.)++* Generating singletons also now generates fixity declarations for the singletonized+ definitions, thanks to @int-index.+ +* Though more an implementation detail: singletons no longer uses kind-level proxies anywhere,+ thanks again to @int-index.++* Support for promoting higher-kinded type variables, thanks for @int-index.++* `Data.Singletons.TypeLits` now exports defunctionalization symbols for `KnownNat`+and `KnownSymbol`.++* Better type inference support around constraints, as tracked in Issue #176.++* Type synonym definitions are now ignored, as they should be.++* `Show` instances for `SNat` and `SSymbol`, thanks to @cumber.++* The `singFun` and `unSingFun` functions no longer use proxies, preferring+ `TypeApplications`.+ 2.2 --- * With `TypeInType`, we no longer kind `KProxy`. @int-index has very helpfully
README.md view
@@ -1,4 +1,4 @@-singletons 2.2+singletons 2.3 ============== [](https://travis-ci.org/goldfirere/singletons)@@ -6,8 +6,8 @@ This is the README file for the singletons library. This file contains all the documentation for the definitions and functions in the library. -The singletons library was written by Richard Eisenberg, eir@cis.upenn.edu, and-with significant contributions by Jan Stolarek, jan.stolarek@p.lodz.pl. There+The singletons library was written by Richard Eisenberg, <rae@cs.brynmawr.edu>, and+with significant contributions by Jan Stolarek, <jan.stolarek@p.lodz.pl>. There are two papers that describe the library. Original one, _Dependently typed programming with singletons_, is available [here](http://www.cis.upenn.edu/~eir/papers/2012/singletons/paper.pdf) and will@@ -17,6 +17,8 @@ and will be referenced in this documentation as the "promotion paper". +Ryan Scott, <ryan.gl.scott@gmail.com>, is an active maintainer.+ Purpose of the singletons library --------------------------------- @@ -33,7 +35,7 @@ Compatibility ------------- -The singletons library requires GHC 8.0.1 or greater. Any code that uses the+The singletons library requires GHC 8.2.1 or greater. Any code that uses the singleton generation primitives needs to enable a long list of GHC extensions. This list includes, but is not necessarily limited to, the following:@@ -146,26 +148,25 @@ A class used to pass singleton values implicitly. The `sing` method produces an explicit singleton value. - data SomeSing (kproxy :: KProxy k) where- SomeSing :: Sing (a :: k) -> SomeSing ('KProxy :: KProxy k)+ data SomeSing k where+ SomeSing :: Sing (a :: k) -> SomeSing k The `SomeSing` type wraps up an _existentially-quantified_ singleton. Note that the type parameter `a` does not appear in the `SomeSing` type. Thus, this type can be used when you have a singleton, but you don't know at compile time what-it will be. `SomeSing ('KProxy :: KProxy Thing)` is isomorphic to `Thing`.+it will be. `SomeSing Thing` is isomorphic to `Thing`. - class (kparam ~ 'KProxy) => SingKind (kparam :: KProxy k) where- type DemoteRep kparam :: *- fromSing :: Sing (a :: k) -> DemoteRep kparam- toSing :: DemoteRep kparam -> SomeSing kparam+ class SingKind k where+ type Demote k :: *+ fromSing :: Sing (a :: k) -> Demote k+ toSing :: Demote k -> SomeSing k This class is used to convert a singleton value back to a value in the original, unrefined ADT. The `fromSing` method converts, say, a singleton `Nat` back to an ordinary `Nat`. The `toSing` method produces an existentially-quantified singleton, wrapped up in a `SomeSing`.-The `DemoteRep` associated-kind-indexed type family maps a proxy of the kind `Nat`-back to the type `Nat`.+The `Demote` associated+kind-indexed type family maps the kind `Nat` back to the type `Nat`. data SingInstance (a :: k) where SingInstance :: SingI a => SingInstance a@@ -281,7 +282,7 @@ This class gets promoted to a "kind class" thus: ```haskell-class (kproxy ~ 'KProxy, PEq kproxy) => POrd (kproxy :: KProxy a) where+class PEq a => POrd a where type Compare (x :: a) (y :: a) :: Ordering type (:<) (x :: a) (y :: a) :: Bool type x :< y = ... -- promoting `case` is yucky.@@ -293,7 +294,7 @@ We also get this singleton class: ```haskell-class (kproxy ~ 'KProxy, SEq kproxy) => SOrd (kproxy :: KProxy a) where+class SEq a => SOrd a where sCompare :: forall (x :: a) (y :: a). Sing x -> Sing y -> Sing (Compare x y) (%:<) :: forall (x :: a) (y :: a). Sing x -> Sing y -> Sing (x :< y) @@ -306,7 +307,7 @@ Note that a singletonized class needs to use `default` signatures, because type-checking the default body requires that the default associated type family instance was used in the promoted class. The extra equality constraint-on the default signature asserts this fact to the type-checker.+on the default signature asserts this fact to the type checker. Instances work roughly similarly. @@ -317,13 +318,13 @@ compare True False = GT compare True True = EQ -instance POrd ('KProxy :: KProxy Bool) where+instance POrd Bool where type Compare 'False 'False = 'EQ type Compare 'False 'True = 'LT type Compare 'True 'False = 'GT type Compare 'True 'True = 'EQ -instance SOrd ('KProxy :: KProxy Bool) where+instance SOrd Bool where sCompare :: forall (x :: a) (y :: a). Sing x -> Sing y -> Sing (Compare x y) sCompare SFalse SFalse = SEQ sCompare SFalse STrue = SLT@@ -484,8 +485,18 @@ * lambda expressions * `!` and `~` patterns (silently but successfully ignored during promotion) * class and instance declarations+* higher-kinded type variables (see below) * functional dependencies (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.+ The following constructs are supported for promotion but not singleton generation: * scoped type variables@@ -500,7 +511,7 @@ | pred x = x : filter pred xs | otherwise = filter pred xs ```-Overlap is caused by `otherwise` catch-all guard, that is always true and this+Overlap is caused by `otherwise` catch-all guard, which is always true and thus overlaps with `pred x` guard. The following constructs are not supported:@@ -510,12 +521,15 @@ * arithmetic sequences * datatypes that store arrows, `Nat`, or `Symbol` * literals (limited support)+* symbolic (as opposed to alphanumeric) types -Why are these out of reach? First two depend on monads, which mention a-higher-kinded type variable. GHC does not support higher-sorted kind variables,-which would be necessary to promote/singletonize monads. There are other tricks-possible, too, but none are likely to work. See the bug report-[here](https://github.com/goldfirere/singletons/issues/37) for more info.+Why are these out of reach? The first two depend on monads, which mention a+higher-kinded type variable. GHC did not support higher-sorted kind variables,+which are be necessary to promote/singletonize monads, and `singletons` has+not be rewritten to accommodate this new ability. [This bug+report](https://github.com/goldfirere/singletons/issues/37) is a feature request+looking for support for these constructs.+ Arithmetic sequences are defined using `Enum` typeclass, which uses infinite lists. @@ -537,6 +551,12 @@ in datatype definitions. But, see [this bug report](https://github.com/goldfirere/singletons/issues/76) for a workaround. +Symbolic types used in kinds were not supported in GHC, but now are. However,+`singletons` still does not support them, mostly because of challenges around+telling datacon names apart from tycon names. [This+issue](https://github.com/goldfirere/singletons/issues/163) tracks adding+this feature.+ Support for `*` --------------- @@ -565,10 +585,6 @@ ---------- * Record updates don't singletonize-* In obscure scenarios, GHC "forgets" constraints on functions. This should- happen only with certain uses where the constraint is needed inside of a- `case` or lambda-expression. Having type inference on result types nearby- makes this more likely to bite. * Inference dependent on functional dependencies is unpredictably bad. The problem is that a use of an associated type family tied to a class with fundeps doesn't provoke the fundep to kick in. This is GHC's problem, in
singletons.cabal view
@@ -1,25 +1,25 @@ name: singletons-version: 2.2+version: 2.3 -- Remember to bump version in the Makefile as well cabal-version: >= 1.10 synopsis: A framework for generating singleton types homepage: http://www.github.com/goldfirere/singletons category: Dependent Types-author: Richard Eisenberg <eir@cis.upenn.edu>, Jan Stolarek <jan.stolarek@p.lodz.pl>-maintainer: Richard Eisenberg <eir@cis.upenn.edu>, Jan Stolarek <jan.stolarek@p.lodz.pl>+author: Richard Eisenberg <rae@cs.brynmawr.edu>, Jan Stolarek <jan.stolarek@p.lodz.pl>+maintainer: Richard Eisenberg <rae@cs.brynmawr.edu>, Jan Stolarek <jan.stolarek@p.lodz.pl> bug-reports: https://github.com/goldfirere/singletons/issues stability: experimental-tested-with: GHC == 8.0.1+tested-with: GHC == 8.2.1 extra-source-files: README.md, CHANGES.md, tests/compile-and-dump/buildGoldenFiles.awk, tests/compile-and-dump/GradingClient/*.hs, tests/compile-and-dump/InsertionSort/*.hs, tests/compile-and-dump/Promote/*.hs, tests/compile-and-dump/Singletons/*.hs- tests/compile-and-dump/GradingClient/*.ghc80.template,- tests/compile-and-dump/InsertionSort/*.ghc80.template,- tests/compile-and-dump/Promote/*.ghc80.template,- tests/compile-and-dump/Singletons/*.ghc80.template+ tests/compile-and-dump/GradingClient/*.ghc82.template,+ tests/compile-and-dump/InsertionSort/*.ghc82.template,+ tests/compile-and-dump/Promote/*.ghc82.template,+ tests/compile-and-dump/Singletons/*.ghc82.template license: BSD3 license-file: LICENSE build-type: Simple@@ -38,16 +38,17 @@ source-repository this type: git location: https://github.com/goldfirere/singletons.git- tag: v2.2+ tag: v2.3 library hs-source-dirs: src- build-depends: base >= 4.9 && < 5,+ build-depends: base >= 4.10 && < 5, mtl >= 2.1.2, template-haskell, containers >= 0.5,- th-desugar >= 1.6 && < 1.7,- syb >= 0.4+ th-desugar >= 1.7 && < 1.8,+ syb >= 0.4,+ text >= 1.2 default-language: Haskell2010 other-extensions: TemplateHaskell -- TemplateHaskell must be listed in cabal file to work with@@ -63,8 +64,10 @@ Data.Singletons.Prelude.Either, Data.Singletons.Prelude.Enum, Data.Singletons.Prelude.Eq,+ Data.Singletons.Prelude.Function, Data.Singletons.Prelude.Ord, Data.Singletons.Prelude.List,+ Data.Singletons.Prelude.List.NonEmpty, Data.Singletons.Prelude.Maybe, Data.Singletons.Prelude.Num Data.Singletons.Prelude.Tuple,@@ -74,9 +77,11 @@ Data.Promotion.Prelude.Bool, Data.Promotion.Prelude.Either, Data.Promotion.Prelude.Eq,+ Data.Promotion.Prelude.Function, Data.Promotion.Prelude.Ord, Data.Promotion.Prelude.Enum, Data.Promotion.Prelude.List,+ Data.Promotion.Prelude.List.NonEmpty, Data.Promotion.Prelude.Maybe, Data.Promotion.Prelude.Num, Data.Promotion.Prelude.Tuple,@@ -88,6 +93,7 @@ Data.Singletons.Deriving.Bounded, Data.Singletons.Deriving.Enum, Data.Singletons.Deriving.Ord,+ Data.Singletons.Prelude.List.NonEmpty.Internal, Data.Singletons.Promote, Data.Singletons.Promote.Monad, Data.Singletons.Promote.Eq,@@ -101,6 +107,7 @@ Data.Singletons.Single.Type, Data.Singletons.Single.Eq, Data.Singletons.Single.Data,+ Data.Singletons.Single.Fixity, Data.Singletons.Single, Data.Singletons.TypeLits.Internal, Data.Singletons.Syntax@@ -115,10 +122,11 @@ main-is: SingletonsTestSuite.hs other-modules: SingletonsTestSuiteUtils - build-depends: base >= 4.9 && < 5,+ build-depends: base >= 4.10 && < 5, filepath >= 1.3, process >= 1.1,+ singletons, tasty >= 0.6, tasty-golden >= 2.2,- Cabal >= 1.16,+ Cabal >= 2.0, directory >= 1
src/Data/Promotion/Prelude.hs view
@@ -70,9 +70,6 @@ -- ** Zipping and unzipping lists Zip, Zip3, ZipWith, ZipWith3, Unzip, Unzip3, - -- * Other datatypes- Proxy(..),- -- * Defunctionalization symbols FalseSym0, TrueSym0, NotSym0, NotSym1, (:&&$), (:&&$$), (:&&$$$), (:||$), (:||$$), (:||$$$),@@ -153,7 +150,6 @@ (:!!$), (:!!$$), (:!!$$$), ) where -import Data.Proxy ( Proxy(..) ) import Data.Promotion.Prelude.Base import Data.Promotion.Prelude.Bool import Data.Promotion.Prelude.Either
src/Data/Promotion/Prelude/Enum.hs view
@@ -1,10 +1,6 @@ {-# LANGUAGE TemplateHaskell, PolyKinds, DataKinds, TypeFamilies, UndecidableInstances, GADTs #-} --- Suppress orphan instance warning for PEnum KProxy. This will go away once #25--- is fixed and instance declaration for Enum Nat is moved to--- Data.Singletons.Prelude.Enum module.-{-# OPTIONS_GHC -fno-warn-orphans #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Promotion.Prelude.Enum
+ src/Data/Promotion/Prelude/Function.hs view
@@ -0,0 +1,38 @@+-----------------------------------------------------------------------------+-- |+-- Module : Data.Promotion.Prelude.Function+-- Copyright : (C) 2016 Richard Eisenberg+-- License : BSD-style (see LICENSE)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu)+-- Stability : experimental+-- Portability : non-portable+--+-- Defines promoted functions from @Data.Function@.+--+-- Because many of these definitions are produced by Template Haskell,+-- it is not possible to create proper Haddock documentation. Please look+-- up the corresponding operation in @Data.Function@. Also, please excuse+-- the apparent repeated variable names. This is due to an interaction+-- between Template Haskell and Haddock.+--+----------------------------------------------------------------------------++{-# LANGUAGE ExplicitNamespaces #-}++module Data.Promotion.Prelude.Function (+ -- * "Prelude" re-exports+ Id, Const, (:.), Flip, type ($)+ -- * Other combinators+ , (:&), On++ -- * Defunctionalization symbols+ , IdSym0, IdSym1+ , ConstSym0, ConstSym1, ConstSym2+ , (:.$), (:.$$), (:.$$$), (:.$$$$)+ , FlipSym0, FlipSym1, FlipSym2, FlipSym3+ , type ($$), type ($$$), type ($$$$)+ , (:&$), (:&$$), (:&$$$)+ , OnSym0, OnSym1, OnSym2, OnSym3, OnSym4+ ) where++import Data.Singletons.Prelude.Function
+ src/Data/Promotion/Prelude/List/NonEmpty.hs view
@@ -0,0 +1,127 @@+-----------------------------------------------------------------------------+-- |+-- Module : Data.Promotion.Prelude.List.NonEmpty+-- Copyright : (C) 2016 Richard Eisenberg+-- License : BSD-style (see LICENSE)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu)+-- Stability : experimental+-- Portability : non-portable+--+-- Defines functions and datatypes relating to promoting 'NonEmpty',+-- including promoted versions of many of the definitions in @Data.List.NonEmpty@.+--+----------------------------------------------------------------------------++module Data.Promotion.Prelude.List.NonEmpty (++ -- * Non-empty stream transformations+ Map,+ Intersperse,+ Scanl,+ Scanr,+ Scanl1,+ Scanr1,+ Transpose,+ SortBy,+ SortWith,+ Length,+ Head,+ Tail,+ Last,+ Init,+ (:<|),+ Cons,+ Uncons,+ Unfoldr,+ Sort,+ Reverse,+ Inits,+ Tails,+ Unfold,+ Insert,+ Take,+ Drop,+ SplitAt,+ TakeWhile,+ DropWhile,+ Span,+ Break,+ Filter,+ Partition,+ Group,+ GroupBy,+ GroupWith,+ GroupAllWith,+ Group1,+ GroupBy1,+ GroupWith1,+ GroupAllWith1,+ IsPrefixOf,+ Nub,+ NubBy,+ (:!!),+ Zip,+ ZipWith,+ Unzip,+ FromList,+ ToList,+ NonEmpty_,+ Xor,++ -- * Defunctionalization symbols+ (:|$), (:|$$), (:|$$$),+ MapSym0, MapSym1, MapSym2,+ IntersperseSym0, IntersperseSym1, IntersperseSym2,+ ScanlSym0, ScanlSym1, ScanlSym2, ScanlSym3,+ ScanrSym0, ScanrSym1, ScanrSym2, ScanrSym3,+ Scanl1Sym0, Scanl1Sym1, Scanl1Sym2,+ Scanr1Sym0, Scanr1Sym1, Scanr1Sym2,+ TransposeSym0, TransposeSym1,+ SortBySym0, SortBySym1, SortBySym2,+ SortWithSym0, SortWithSym1, SortWithSym2,+ LengthSym0, LengthSym1,+ HeadSym0, HeadSym1,+ TailSym0, TailSym1,+ LastSym0, LastSym1,+ InitSym0, InitSym1,+ (:<|$), (:<|$$), (:<|$$$),+ ConsSym0, ConsSym1, ConsSym2,+ UnconsSym0, UnconsSym1,+ UnfoldrSym0, UnfoldrSym1, UnfoldrSym2,+ SortSym0, SortSym1,+ ReverseSym0, ReverseSym1,+ InitsSym0, InitsSym1,+ TailsSym0, TailsSym1,+ UnfoldSym0, UnfoldSym1,+ InsertSym0, InsertSym1, InsertSym2,+ TakeSym0, TakeSym1, TakeSym2,+ DropSym0, DropSym1, DropSym2,+ SplitAtSym0, SplitAtSym1, SplitAtSym2,+ TakeWhileSym0, TakeWhileSym1, TakeWhileSym2,+ DropWhileSym0, DropWhileSym1, DropWhileSym2,+ SpanSym0, SpanSym1, SpanSym2,+ BreakSym0, BreakSym1, BreakSym2,+ FilterSym0, FilterSym1, FilterSym2,+ PartitionSym0, PartitionSym1, PartitionSym2,+ GroupSym0, GroupSym1,+ GroupBySym0, GroupBySym1, GroupBySym2,+ GroupWithSym0, GroupWithSym1, GroupWithSym2,+ GroupAllWithSym0, GroupAllWithSym1, GroupAllWithSym2,+ Group1Sym0, Group1Sym1,+ GroupBy1Sym0, GroupBy1Sym1, GroupBy1Sym2,+ GroupWith1Sym0, GroupWith1Sym1, GroupWith1Sym2,+ GroupAllWith1Sym0, GroupAllWith1Sym1, GroupAllWith1Sym2,+ IsPrefixOfSym0, IsPrefixOfSym1, IsPrefixOfSym2,+ NubSym0, NubSym1,+ NubBySym0, NubBySym1, NubBySym2,+ (:!!$), (:!!$$), (:!!$$$),+ ZipSym0, ZipSym1, ZipSym2,+ ZipWithSym0, ZipWithSym1, ZipWithSym2, ZipWithSym3,+ UnzipSym0, UnzipSym1,+ FromListSym0, FromListSym1,+ ToListSym0, ToListSym1,+ NonEmpty_Sym0, NonEmpty_Sym1,+ XorSym0, XorSym1+ ) where++import Data.Singletons.Prelude.List.NonEmpty
src/Data/Promotion/Prelude/Num.hs view
@@ -3,7 +3,7 @@ -- Module : Data.Promotion.Prelude.Num -- Copyright : (C) 2014 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --
src/Data/Promotion/TH.hs view
@@ -5,7 +5,7 @@ -- Module : Data.Promotion.TH -- Copyright : (C) 2013 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --
src/Data/Singletons.hs view
@@ -1,14 +1,14 @@ {-# LANGUAGE MagicHash, RankNTypes, PolyKinds, GADTs, DataKinds, FlexibleContexts, FlexibleInstances,- TypeFamilies, TypeOperators,- UndecidableInstances, TypeInType #-}+ TypeFamilies, TypeOperators, TypeFamilyDependencies,+ UndecidableInstances, TypeInType, ConstraintKinds #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Singletons -- Copyright : (C) 2013 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --@@ -17,9 +17,9 @@ -- for singletons based on types in the @Prelude@. -- -- You may also want to read--- <http://www.cis.upenn.edu/~eir/packages/singletons/README.html> and the--- original paper presenting this library, available at--- <http://www.cis.upenn.edu/~eir/papers/2012/singletons/paper.pdf>.+-- the original papers presenting this library, available at+-- <http://cs.brynmawr.edu/~rae/papers/2012/singletons/paper.pdf>+-- and <http://cs.brynmawr.edu/~rae/papers/2014/promotion/promotion.pdf>. -- ---------------------------------------------------------------------------- @@ -32,7 +32,7 @@ SingI(..), SingKind(..), -- * Working with singletons- KindOf, Demote,+ KindOf, SameKind, SingInstance(..), SomeSing(..), singInstance, withSingI, withSomeSing, singByProxy, @@ -64,12 +64,18 @@ import Data.Kind import Unsafe.Coerce import Data.Proxy ( Proxy(..) )-import GHC.Exts ( Proxy# )+import GHC.Exts ( Proxy#, Constraint ) -- | Convenient synonym to refer to the kind of a type variable:--- @type KindOf (a :: k) = ('Proxy :: Proxy k)@-type KindOf (a :: k) = ('Proxy :: Proxy k)+-- @type KindOf (a :: k) = k@+type KindOf (a :: k) = k +-- | Force GHC to unify the kinds of @a@ and @b@. Note that @SameKind a b@ is+-- different from @KindOf a ~ KindOf b@ in that the former makes the kinds+-- unify immediately, whereas the latter is a proposition that GHC considers+-- as possibly false.+type SameKind (a :: k) (b :: k) = (() :: Constraint)+ ---------------------------------------------------------------------- ---- Sing & friends -------------------------------------------------- ----------------------------------------------------------------------@@ -89,19 +95,16 @@ -- for which singletons are defined. The class supports converting between a singleton -- type and the base (unrefined) type which it is built from. class SingKind k where- -- | Get a base type from a proxy for the promoted kind. For example,- -- @DemoteRep Bool@ will be the type @Bool@.- type DemoteRep k :: *+ -- | Get a base type from the promoted kind. For example,+ -- @Demote Bool@ will be the type @Bool@. Rarely, the type and kind do not+ -- match. For example, @Demote Nat@ is @Integer@.+ type Demote k = (r :: *) | r -> k -- | Convert a singleton to its unrefined version.- fromSing :: Sing (a :: k) -> DemoteRep k+ fromSing :: Sing (a :: k) -> Demote k -- | Convert an unrefined type to an existentially-quantified singleton type.- toSing :: DemoteRep k -> SomeSing k---- | Convenient abbreviation for 'DemoteRep':--- @type Demote (a :: k) = DemoteRep k@-type Demote (a :: k) = DemoteRep k+ toSing :: Demote k -> SomeSing k -- | An /existentially-quantified/ singleton. This type is useful when you want a -- singleton type, but there is no way of knowing, at compile-time, what the type@@ -198,77 +201,77 @@ SLambda { applySing :: forall t. Sing t -> Sing (f @@ t) } instance (SingKind k1, SingKind k2) => SingKind (k1 ~> k2) where- type DemoteRep (k1 ~> k2) = DemoteRep k1 -> DemoteRep k2+ type Demote (k1 ~> k2) = Demote k1 -> Demote k2 fromSing sFun x = withSomeSing x (fromSing . applySing sFun) toSing _ = error "Cannot create existentially-quantified singleton functions." type SingFunction1 f = forall t. Sing t -> Sing (f @@ t) -- | Use this function when passing a function on singletons as--- a higher-order function. You will often need an explicit type--- annotation to get this to work. For example:+-- a higher-order function. You will need visible type application+-- to get this to work. For example: ----- > falses = sMap (singFun1 (Proxy :: Proxy NotSym0) sNot)+-- > falses = sMap (singFun1 @NotSym0 sNot) -- > (STrue `SCons` STrue `SCons` SNil) -- -- There are a family of @singFun...@ functions, keyed by the number -- of parameters of the function.-singFun1 :: Proxy f -> SingFunction1 f -> Sing f-singFun1 _ f = SLambda f+singFun1 :: forall f. SingFunction1 f -> Sing f+singFun1 f = SLambda f type SingFunction2 f = forall t. Sing t -> SingFunction1 (f @@ t)-singFun2 :: Proxy f -> SingFunction2 f -> Sing f-singFun2 _ f = SLambda (\x -> singFun1 Proxy (f x))+singFun2 :: forall f. SingFunction2 f -> Sing f+singFun2 f = SLambda (\x -> singFun1 (f x)) type SingFunction3 f = forall t. Sing t -> SingFunction2 (f @@ t)-singFun3 :: Proxy f -> SingFunction3 f -> Sing f-singFun3 _ f = SLambda (\x -> singFun2 Proxy (f x))+singFun3 :: forall f. SingFunction3 f -> Sing f+singFun3 f = SLambda (\x -> singFun2 (f x)) type SingFunction4 f = forall t. Sing t -> SingFunction3 (f @@ t)-singFun4 :: Proxy f -> SingFunction4 f -> Sing f-singFun4 _ f = SLambda (\x -> singFun3 Proxy (f x))+singFun4 :: forall f. SingFunction4 f -> Sing f+singFun4 f = SLambda (\x -> singFun3 (f x)) type SingFunction5 f = forall t. Sing t -> SingFunction4 (f @@ t)-singFun5 :: Proxy f -> SingFunction5 f -> Sing f-singFun5 _ f = SLambda (\x -> singFun4 Proxy (f x))+singFun5 :: forall f. SingFunction5 f -> Sing f+singFun5 f = SLambda (\x -> singFun4 (f x)) type SingFunction6 f = forall t. Sing t -> SingFunction5 (f @@ t)-singFun6 :: Proxy f -> SingFunction6 f -> Sing f-singFun6 _ f = SLambda (\x -> singFun5 Proxy (f x))+singFun6 :: forall f. SingFunction6 f -> Sing f+singFun6 f = SLambda (\x -> singFun5 (f x)) type SingFunction7 f = forall t. Sing t -> SingFunction6 (f @@ t)-singFun7 :: Proxy f -> SingFunction7 f -> Sing f-singFun7 _ f = SLambda (\x -> singFun6 Proxy (f x))+singFun7 :: forall f. SingFunction7 f -> Sing f+singFun7 f = SLambda (\x -> singFun6 (f x)) type SingFunction8 f = forall t. Sing t -> SingFunction7 (f @@ t)-singFun8 :: Proxy f -> SingFunction8 f -> Sing f-singFun8 _ f = SLambda (\x -> singFun7 Proxy (f x))+singFun8 :: forall f. SingFunction8 f -> Sing f+singFun8 f = SLambda (\x -> singFun7 (f x)) -- | This is the inverse of 'singFun1', and likewise for the other -- @unSingFun...@ functions.-unSingFun1 :: Proxy f -> Sing f -> SingFunction1 f-unSingFun1 _ sf = applySing sf+unSingFun1 :: forall f. Sing f -> SingFunction1 f+unSingFun1 sf = applySing sf -unSingFun2 :: Proxy f -> Sing f -> SingFunction2 f-unSingFun2 _ sf x = unSingFun1 Proxy (sf `applySing` x)+unSingFun2 :: forall f. Sing f -> SingFunction2 f+unSingFun2 sf x = unSingFun1 (sf `applySing` x) -unSingFun3 :: Proxy f -> Sing f -> SingFunction3 f-unSingFun3 _ sf x = unSingFun2 Proxy (sf `applySing` x)+unSingFun3 :: forall f. Sing f -> SingFunction3 f+unSingFun3 sf x = unSingFun2 (sf `applySing` x) -unSingFun4 :: Proxy f -> Sing f -> SingFunction4 f-unSingFun4 _ sf x = unSingFun3 Proxy (sf `applySing` x)+unSingFun4 :: forall f. Sing f -> SingFunction4 f+unSingFun4 sf x = unSingFun3 (sf `applySing` x) -unSingFun5 :: Proxy f -> Sing f -> SingFunction5 f-unSingFun5 _ sf x = unSingFun4 Proxy (sf `applySing` x)+unSingFun5 :: forall f. Sing f -> SingFunction5 f+unSingFun5 sf x = unSingFun4 (sf `applySing` x) -unSingFun6 :: Proxy f -> Sing f -> SingFunction6 f-unSingFun6 _ sf x = unSingFun5 Proxy (sf `applySing` x)+unSingFun6 :: forall f. Sing f -> SingFunction6 f+unSingFun6 sf x = unSingFun5 (sf `applySing` x) -unSingFun7 :: Proxy f -> Sing f -> SingFunction7 f-unSingFun7 _ sf x = unSingFun6 Proxy (sf `applySing` x)+unSingFun7 :: forall f. Sing f -> SingFunction7 f+unSingFun7 sf x = unSingFun6 (sf `applySing` x) -unSingFun8 :: Proxy f -> Sing f -> SingFunction8 f-unSingFun8 _ sf x = unSingFun7 Proxy (sf `applySing` x)+unSingFun8 :: forall f. Sing f -> SingFunction8 f+unSingFun8 sf x = unSingFun7 (sf `applySing` x) ---------------------------------------------------------------------- ---- Convenience -----------------------------------------------------@@ -283,8 +286,9 @@ -- | Convert a normal datatype (like 'Bool') to a singleton for that datatype, -- passing it into a continuation.-withSomeSing :: SingKind k- => DemoteRep k -- ^ The original datatype+withSomeSing :: forall k r+ . SingKind k+ => Demote k -- ^ The original datatype -> (forall (a :: k). Sing a -> r) -- ^ Function expecting a singleton -> r withSomeSing x f =@@ -303,7 +307,7 @@ -- returns 'Nothing'. The property is expressed in terms of the underlying -- representation of the singleton. singThat :: forall (a :: k). (SingKind k, SingI a)- => (Demote a -> Bool) -> Maybe (Sing a)+ => (Demote k -> Bool) -> Maybe (Sing a) singThat p = withSing $ \x -> if p (fromSing x) then Just x else Nothing -- | Allows creation of a singleton when a proxy is at hand.
src/Data/Singletons/CustomStar.hs view
@@ -5,7 +5,7 @@ -- Module : Data.Singletons.CustomStar -- Copyright : (C) 2013 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --@@ -72,7 +72,7 @@ kinds <- mapM getKind names ctors <- zipWithM (mkCtor True) names kinds let repDecl = DDataD Data [] repName [] ctors- [DConPr ''Eq, DConPr ''Show, DConPr ''Read]+ [DDerivClause Nothing [DConPr ''Eq, DConPr ''Show, DConPr ''Read]] fakeCtors <- zipWithM (mkCtor False) names kinds let dataDecl = DataDecl Data repName [] fakeCtors [DConPr ''Show, DConPr ''Read , DConPr ''Eq]
src/Data/Singletons/Decide.hs view
@@ -7,7 +7,7 @@ -- Module : Data.Singletons.Decide -- Copyright : (C) 2013 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --
src/Data/Singletons/Deriving/Bounded.hs view
@@ -3,7 +3,7 @@ -- Module : Data.Singletons.Deriving.Bounded -- Copyright : (C) 2015 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu -- Stability : experimental -- Portability : non-portable --
src/Data/Singletons/Deriving/Enum.hs view
@@ -3,7 +3,7 @@ -- Module : Data.Singletons.Deriving.Enum -- Copyright : (C) 2015 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --
src/Data/Singletons/Deriving/Infer.hs view
@@ -3,7 +3,7 @@ -- Module : Data.Singletons.Deriving.Infer -- Copyright : (C) 2015 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu -- Stability : experimental -- Portability : non-portable --
src/Data/Singletons/Deriving/Ord.hs view
@@ -3,7 +3,7 @@ -- Module : Data.Singletons.Deriving.Ord -- Copyright : (C) 2015 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu -- Stability : experimental -- Portability : non-portable --
src/Data/Singletons/Names.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Names.hs (c) Richard Eisenberg 2014-eir@cis.upenn.edu+rae@cs.brynmawr.edu Defining names and manipulations on names for use in promotion and singling. -}@@ -16,10 +16,9 @@ import Language.Haskell.TH.Syntax import Language.Haskell.TH.Desugar import GHC.TypeLits ( Nat, Symbol )-import GHC.Exts ( Any )+import GHC.Exts ( Any, Constraint ) import Data.Typeable ( TypeRep ) import Data.Singletons.Util-import Data.Proxy ( Proxy(..) ) import Control.Monad anyTypeName, boolName, andName, tyEqName, compareName, minBoundName,@@ -27,18 +26,18 @@ nilName, consName, listName, tyFunName, applyName, natName, symbolName, undefinedName, typeRepName, stringName, eqName, ordName, boundedName, orderingName,- singFamilyName, singIName, singMethName, demoteRepName,+ singFamilyName, singIName, singMethName, demoteName, singKindClassName, sEqClassName, sEqMethName, sconsName, snilName,- sIfName, proxyTypeName, proxyDataName,+ sIfName, someSingTypeName, someSingDataName, sListName, sDecideClassName, sDecideMethName, provedName, disprovedName, reflName, toSingName, fromSingName, equalityName, applySingName, suppressClassName, suppressMethodName, thenCmpName,- kindOfName, tyFromIntegerName, tyNegateName, sFromIntegerName,+ sameKindName, tyFromIntegerName, tyNegateName, sFromIntegerName, sNegateName, errorName, foldlName, cmpEQName, cmpLTName, cmpGTName, singletonsToEnumName, singletonsFromEnumName, enumName, singletonsEnumName,- equalsName :: Name+ equalsName, constraintName :: Name anyTypeName = ''Any boolName = ''Bool andName = '(&&)@@ -66,7 +65,7 @@ singMethName = 'sing toSingName = 'toSing fromSingName = 'fromSing-demoteRepName = ''DemoteRep+demoteName = ''Demote singKindClassName = ''SingKind sEqClassName = mk_name_tc "Data.Singletons.Prelude.Eq" "SEq" sEqMethName = mk_name_v "Data.Singletons.Prelude.Eq" "%:=="@@ -75,8 +74,6 @@ snilName = mk_name_d "Data.Singletons.Prelude.Instances" "SNil" someSingTypeName = ''SomeSing someSingDataName = 'SomeSing-proxyTypeName = ''Proxy-proxyDataName = 'Proxy sListName = mk_name_tc "Data.Singletons.Prelude.Instances" "SList" sDecideClassName = ''SDecide sDecideMethName = '(%~)@@ -88,7 +85,7 @@ suppressClassName = ''SuppressUnusedWarnings suppressMethodName = 'suppressUnusedWarnings thenCmpName = mk_name_v "Data.Singletons.Prelude.Ord" "thenCmp"-kindOfName = ''KindOf+sameKindName = ''SameKind tyFromIntegerName = mk_name_tc "Data.Singletons.Prelude.Num" "FromInteger" tyNegateName = mk_name_tc "Data.Singletons.Prelude.Num" "Negate" sFromIntegerName = mk_name_v "Data.Singletons.Prelude.Num" "sFromInteger"@@ -103,6 +100,7 @@ enumName = ''Enum singletonsEnumName = mk_name_tc "Data.Singletons.Prelude.Enum" "Enum" equalsName = '(==)+constraintName = ''Constraint singPkg :: String singPkg = $( (LitE . StringL . loc_package) `liftM` location )@@ -215,12 +213,6 @@ | head (nameBase n) == '_' = (prefixLCName "_s" "%") $ n | otherwise = (prefixLCName "s" "%") $ upcase n -kindParam :: DKind -> DType-kindParam k = DSigT (DConT proxyDataName) (DConT proxyTypeName `DAppT` k)--proxyFor :: DType -> DExp-proxyFor ty = DSigE (DConE proxyDataName) (DAppT (DConT proxyTypeName) ty)- singFamily :: DType singFamily = DConT singFamilyName @@ -228,7 +220,7 @@ singKindConstraint = DAppPr (DConPr singKindClassName) demote :: DType-demote = DConT demoteRepName+demote = DConT demoteName apply :: DType -> DType -> DType apply t1 t2 = DAppT (DAppT (DConT applyName) t1) t2@@ -245,13 +237,3 @@ -- make and equality predicate mkEqPred :: DType -> DType -> DPred mkEqPred ty1 ty2 = foldl DAppPr (DConPr equalityName) [ty1, ty2]---- create a bunch of kproxy vars, and constrain them all to be 'KProxy-mkKProxies :: Quasi q- => [Name] -- for the kinds of the kproxies- -> q ([DTyVarBndr], DCxt)-mkKProxies ns = do- kproxies <- mapM (const $ qNewName "kproxy") ns- return ( zipWith (\kp kv -> DKindedTV kp (DConT proxyTypeName `DAppT` DVarT kv))- kproxies ns- , map (\kp -> mkEqPred (DVarT kp) (DConT proxyDataName)) kproxies )
src/Data/Singletons/Partition.hs view
@@ -3,7 +3,7 @@ -- Module : Data.Singletons.Partition -- Copyright : (C) 2015 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu -- Stability : experimental -- Portability : non-portable --@@ -11,6 +11,8 @@ -- ---------------------------------------------------------------------------- +{-# LANGUAGE TupleSections #-}+ module Data.Singletons.Partition where import Prelude hiding ( exp )@@ -46,23 +48,35 @@ partitionDecs = concatMapM partitionDec partitionDec :: Quasi m => DDec -> m PartitionedDecs+partitionDec (DLetDec (DPragmaD {})) = return mempty partitionDec (DLetDec letdec) = return $ mempty { pd_let_decs = [letdec] } partitionDec (DDataD nd _cxt name tvbs cons derivings) = do- (derivings', derived_instances) <- partitionWithM part_derivings derivings+ (derivings', derived_instances) <- partitionWithM part_derivings+ $ concatMap flatten_clause derivings return $ mempty { pd_data_decs = [DataDecl nd name tvbs cons derivings'] , pd_instance_decs = derived_instances } where ty = foldType (DConT name) (map tvbToType tvbs)- part_derivings :: Quasi m => DPred -> m (Either DPred UInstDecl)- part_derivings deriv = case deriv of++ flatten_clause :: DDerivClause -> [(Maybe DerivStrategy, DPred)]+ flatten_clause (DDerivClause strat preds) = map (strat,) preds++ part_derivings :: Quasi m => (Maybe DerivStrategy, DPred)+ -> m (Either DPred UInstDecl)+ part_derivings (strat, deriv) = case deriv of DConPr deriv_name- | deriv_name == ordName+ | stock, deriv_name == ordName -> Right <$> mkOrdInstance ty cons- | deriv_name == boundedName+ | stock, deriv_name == boundedName -> Right <$> mkBoundedInstance ty cons- | deriv_name == enumName+ | stock, deriv_name == enumName -> Right <$> mkEnumInstance ty cons+ where+ stock = case strat of+ Nothing -> True+ Just StockStrategy -> True+ Just _ -> False _ -> return (Left deriv) partitionDec (DClassD cxt name tvbs fds decs) = do@@ -85,7 +99,9 @@ split_app_tys acc (DSigT t _) = split_app_tys acc t split_app_tys _ _ = fail $ "Illegal instance head: " ++ show ty partitionDec (DRoleAnnotD {}) = return mempty -- ignore these-partitionDec (DPragmaD {}) = return mempty+partitionDec (DTySynD {}) = return mempty -- ignore type synonyms;+ -- promotion is a no-op, and+ -- singling expands all syns partitionDec dec = fail $ "Declaration cannot be promoted: " ++ pprint (decToTH dec) @@ -97,7 +113,7 @@ return $ valueBinding name (UFunction clauses) partitionClassDec (DLetDec (DInfixD fixity name)) = return $ infixDecl fixity name-partitionClassDec (DPragmaD {}) = return mempty+partitionClassDec (DLetDec (DPragmaD {})) = return mempty partitionClassDec _ = fail "Only method declarations can be promoted within a class." @@ -106,6 +122,6 @@ return $ Just (name, UValue exp) partitionInstanceDec (DLetDec (DFunD name clauses)) = return $ Just (name, UFunction clauses)-partitionInstanceDec (DPragmaD {}) = return Nothing+partitionInstanceDec (DLetDec (DPragmaD {})) = return Nothing partitionInstanceDec _ = fail "Only method bodies can be promoted within an instance."
src/Data/Singletons/Prelude.hs view
@@ -3,7 +3,7 @@ -- Module : Data.Singletons.Prelude -- Copyright : (C) 2013 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --
src/Data/Singletons/Prelude/Bool.hs view
@@ -6,7 +6,7 @@ -- Module : Data.Singletons.Prelude.Bool -- Copyright : (C) 2013-2014 Richard Eisenberg, Jan Stolarek -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --
src/Data/Singletons/Prelude/Either.hs view
@@ -6,7 +6,7 @@ -- Module : Data.Singletons.Prelude.Either -- Copyright : (C) 2013-2014 Richard Eisenberg, Jan Stolarek -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --
src/Data/Singletons/Prelude/Enum.hs view
@@ -72,7 +72,7 @@ -- | Used in Haskell's translation of @[n,n'..m]@. enumFromThenTo :: a -> a -> a -> [a] - succ = toEnum . (1 +) . fromEnum+ succ = toEnum . (+1) . fromEnum pred = toEnum . (subtract 1) . fromEnum -- enumFrom x = map toEnum [fromEnum x ..] -- enumFromThen x y = map toEnum [fromEnum x, fromEnum y ..]
src/Data/Singletons/Prelude/Eq.hs view
@@ -7,7 +7,7 @@ -- Module : Data.Singletons.Prelude.Eq -- Copyright : (C) 2013 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --@@ -21,7 +21,6 @@ ) where import Data.Singletons.Prelude.Bool-import Data.Singletons import Data.Singletons.Single import Data.Singletons.Prelude.Instances import Data.Singletons.Util@@ -33,7 +32,7 @@ -- | The promoted analogue of 'Eq'. If you supply no definition for '(:==)', -- then it defaults to a use of '(==)', from @Data.Type.Equality@.-class kproxy ~ 'Proxy => PEq (kproxy :: Proxy a) where+class PEq a where type (:==) (x :: a) (y :: a) :: Bool type (:/=) (x :: a) (y :: a) :: Bool
+ src/Data/Singletons/Prelude/Function.hs view
@@ -0,0 +1,115 @@+-----------------------------------------------------------------------------+-- |+-- Module : Data.Singletons.Prelude.Function+-- Copyright : (C) 2016 Richard Eisenberg+-- License : BSD-style (see LICENSE)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu)+-- Stability : experimental+-- Portability : non-portable+--+-- Defines singleton versions of the definitions in @Data.Function@.+--+-- Because many of these definitions are produced by Template Haskell,+-- it is not possible to create proper Haddock documentation. Please look+-- up the corresponding operation in @Data.Function@. Also, please excuse+-- the apparent repeated variable names. This is due to an interaction+-- between Template Haskell and Haddock.+--+----------------------------------------------------------------------------++{-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeInType, TypeFamilies,+ TypeOperators, UndecidableInstances, GADTs #-}++module Data.Singletons.Prelude.Function (+ -- * "Prelude" re-exports+ Id, sId, Const, sConst, (:.), (%:.), Flip, sFlip, type ($), (%$)+ -- * Other combinators+ , (:&), (%:&), On, sOn++ -- * Defunctionalization symbols+ , IdSym0, IdSym1+ , ConstSym0, ConstSym1, ConstSym2+ , (:.$), (:.$$), (:.$$$), (:.$$$$)+ , FlipSym0, FlipSym1, FlipSym2, FlipSym3+ , type ($$), type ($$$), type ($$$$)+ , (:&$), (:&$$), (:&$$$)+ , OnSym0, OnSym1, OnSym2, OnSym3, OnSym4+ ) where++import Data.Singletons.Prelude.Base+import Data.Singletons.Single++$(singletonsOnly [d|+ {- GHC falls into a loop here. Not really a surprise.++ -- | @'fix' f@ is the least fixed point of the function @f@,+ -- i.e. the least defined @x@ such that @f x = x@.+ fix :: (a -> a) -> a+ fix f = let x = f x in x+ -}++ -- | @(*) \`on\` f = \\x y -> f x * f y@.+ --+ -- Typical usage: @'Data.List.sortBy' ('compare' \`on\` 'fst')@.+ --+ -- Algebraic properties:+ --+ -- * @(*) \`on\` 'id' = (*)@ (if @(*) ∉ {⊥, 'const' ⊥}@)+ --+ -- * @((*) \`on\` f) \`on\` g = (*) \`on\` (f . g)@+ --+ -- * @'flip' on f . 'flip' on g = 'flip' on (g . f)@++ -- Proofs (so that I don't have to edit the test-suite):++ -- (*) `on` id+ -- =+ -- \x y -> id x * id y+ -- =+ -- \x y -> x * y+ -- = { If (*) /= _|_ or const _|_. }+ -- (*)++ -- (*) `on` f `on` g+ -- =+ -- ((*) `on` f) `on` g+ -- =+ -- \x y -> ((*) `on` f) (g x) (g y)+ -- =+ -- \x y -> (\x y -> f x * f y) (g x) (g y)+ -- =+ -- \x y -> f (g x) * f (g y)+ -- =+ -- \x y -> (f . g) x * (f . g) y+ -- =+ -- (*) `on` (f . g)+ -- =+ -- (*) `on` f . g++ -- flip on f . flip on g+ -- =+ -- (\h (*) -> (*) `on` h) f . (\h (*) -> (*) `on` h) g+ -- =+ -- (\(*) -> (*) `on` f) . (\(*) -> (*) `on` g)+ -- =+ -- \(*) -> (*) `on` g `on` f+ -- = { See above. }+ -- \(*) -> (*) `on` g . f+ -- =+ -- (\h (*) -> (*) `on` h) (g . f)+ -- =+ -- flip on (g . f)++ on :: (b -> b -> c) -> (a -> b) -> a -> a -> c+ (.*.) `on` f = \x y -> f x .*. f y+++ -- | '&' is a reverse application operator. This provides notational+ -- convenience. Its precedence is one higher than that of the forward+ -- application operator '$', which allows '&' to be nested in '$'.+ --+ -- @since 4.8.0.0+ (&) :: a -> (a -> b) -> b+ x & f = f x++ |])
src/Data/Singletons/Prelude/Instances.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Instances.hs (c) Richard Eisenberg 2013-eir@cis.upenn.edu+rae@cs.brynmawr.edu This (internal) module contains the main class definitions for singletons, re-exported from various places.
src/Data/Singletons/Prelude/List.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE TypeOperators, DataKinds, PolyKinds, TypeFamilies, TypeInType, TemplateHaskell, GADTs, UndecidableInstances, RankNTypes,- ScopedTypeVariables, FlexibleContexts #-}+ ScopedTypeVariables, FlexibleContexts, AllowAmbiguousTypes #-} {-# OPTIONS_GHC -O0 #-} -----------------------------------------------------------------------------@@ -8,7 +8,7 @@ -- Module : Data.Singletons.Prelude.List -- Copyright : (C) 2013-2014 Richard Eisenberg, Jan Stolarek -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --@@ -306,12 +306,18 @@ prependToAll _ [] = [] prependToAll sep (x:xs) = sep : x : prependToAll sep xs - permutations :: [a] -> [[a]]+ permutations :: forall a. [a] -> [[a]] permutations xs0 = xs0 : perms xs0 [] where perms [] _ = [] perms (t:ts) is = foldr interleave (perms ts (t:is)) (permutations is) where interleave xs r = let (_,zs) = interleave' id xs r in zs++ -- This type signature isn't present in the reference+ -- implementation of permutations in base. However, it is needed+ -- here, since (at least in GHC 8.2.1) the singletonized version+ -- will fail to typecheck without it. See #13549 for the full story.+ interleave' :: ([a] -> b) -> [a] -> [b] -> ([a], [b]) interleave' _ [] r = (ts, r) interleave' f (y:ys) r = let (us,zs) = interleave' (f . (y:)) ys r in (y:us, f (t:y:us) : zs)
+ src/Data/Singletons/Prelude/List/NonEmpty.hs view
@@ -0,0 +1,555 @@+{-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeInType, TypeOperators,+ TypeFamilies, GADTs, UndecidableInstances #-}++-----------------------------------------------------------------------------+-- |+-- Module : Data.Singletons.Prelude.List.NonEmpty+-- Copyright : (C) 2016 Richard Eisenberg+-- License : BSD-style (see LICENSE)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu)+-- Stability : experimental+-- Portability : non-portable+--+-- Defines functions and datatypes relating to the singleton for 'NonEmpty',+-- including a singletons version of all the definitions in @Data.List.NonEmpty@.+--+-- Because many of these definitions are produced by Template Haskell,+-- it is not possible to create proper Haddock documentation. Please look+-- up the corresponding operation in @Data.List.NonEmpty@. Also, please excuse+-- the apparent repeated variable names. This is due to an interaction+-- between Template Haskell and Haddock.+--+----------------------------------------------------------------------------++module Data.Singletons.Prelude.List.NonEmpty (+ -- * The 'NonEmpty' singleton++ Sing((:%|)),++ -- | Though Haddock doesn't show it, the 'Sing' instance above declares+ -- constructor+ --+ -- > (:%|) :: Sing h -> Sing t -> Sing (h :| t)++ SNonEmpty,+ -- | 'SNonEmpty' is a kind-restricted synonym for 'Sing':+ -- @type SNonEmpty (a :: NonEmpty) = Sing a@++ -- * Non-empty stream transformations+ Map, sMap,+ Intersperse, sIntersperse,+ Scanl, sScanl,+ Scanr, sScanr,+ Scanl1, sScanl1,+ Scanr1, sScanr1,+ Transpose, sTranspose,+ SortBy, sSortBy,+ SortWith, sSortWith,+ Length, sLength,+ Head, sHead,+ Tail, sTail,+ Last, sLast,+ Init, sInit,+ (:<|), (%:<|),+ Cons, sCons,+ Uncons, sUncons,+ Unfoldr, sUnfoldr,+ Sort, sSort,+ Reverse, sReverse,+ Inits, sInits,+ Tails, sTails,+ Unfold, sUnfold,+ Insert, sInsert,+ Take, sTake,+ Drop, sDrop,+ SplitAt, sSplitAt,+ TakeWhile, sTakeWhile,+ DropWhile, sDropWhile,+ Span, sSpan,+ Break, sBreak,+ Filter, sFilter,+ Partition, sPartition,+ Group, sGroup,+ GroupBy, sGroupBy,+ GroupWith, sGroupWith,+ GroupAllWith, sGroupAllWith,+ Group1, sGroup1,+ GroupBy1, sGroupBy1,+ GroupWith1, sGroupWith1,+ GroupAllWith1, sGroupAllWith1,+ IsPrefixOf, sIsPrefixOf,+ Nub, sNub,+ NubBy, sNubBy,+ (:!!), (%:!!),+ Zip, sZip,+ ZipWith, sZipWith,+ Unzip, sUnzip,+ FromList, sFromList,+ ToList, sToList,+ NonEmpty_, sNonEmpty_,+ Xor, sXor,++ -- * Defunctionalization symbols+ (:|$), (:|$$), (:|$$$),+ MapSym0, MapSym1, MapSym2,+ IntersperseSym0, IntersperseSym1, IntersperseSym2,+ ScanlSym0, ScanlSym1, ScanlSym2, ScanlSym3,+ ScanrSym0, ScanrSym1, ScanrSym2, ScanrSym3,+ Scanl1Sym0, Scanl1Sym1, Scanl1Sym2,+ Scanr1Sym0, Scanr1Sym1, Scanr1Sym2,+ TransposeSym0, TransposeSym1,+ SortBySym0, SortBySym1, SortBySym2,+ SortWithSym0, SortWithSym1, SortWithSym2,+ LengthSym0, LengthSym1,+ HeadSym0, HeadSym1,+ TailSym0, TailSym1,+ LastSym0, LastSym1,+ InitSym0, InitSym1,+ (:<|$), (:<|$$), (:<|$$$),+ ConsSym0, ConsSym1, ConsSym2,+ UnconsSym0, UnconsSym1,+ UnfoldrSym0, UnfoldrSym1, UnfoldrSym2,+ SortSym0, SortSym1,+ ReverseSym0, ReverseSym1,+ InitsSym0, InitsSym1,+ TailsSym0, TailsSym1,+ UnfoldSym0, UnfoldSym1,+ InsertSym0, InsertSym1, InsertSym2,+ TakeSym0, TakeSym1, TakeSym2,+ DropSym0, DropSym1, DropSym2,+ SplitAtSym0, SplitAtSym1, SplitAtSym2,+ TakeWhileSym0, TakeWhileSym1, TakeWhileSym2,+ DropWhileSym0, DropWhileSym1, DropWhileSym2,+ SpanSym0, SpanSym1, SpanSym2,+ BreakSym0, BreakSym1, BreakSym2,+ FilterSym0, FilterSym1, FilterSym2,+ PartitionSym0, PartitionSym1, PartitionSym2,+ GroupSym0, GroupSym1,+ GroupBySym0, GroupBySym1, GroupBySym2,+ GroupWithSym0, GroupWithSym1, GroupWithSym2,+ GroupAllWithSym0, GroupAllWithSym1, GroupAllWithSym2,+ Group1Sym0, Group1Sym1,+ GroupBy1Sym0, GroupBy1Sym1, GroupBy1Sym2,+ GroupWith1Sym0, GroupWith1Sym1, GroupWith1Sym2,+ GroupAllWith1Sym0, GroupAllWith1Sym1, GroupAllWith1Sym2,+ IsPrefixOfSym0, IsPrefixOfSym1, IsPrefixOfSym2,+ NubSym0, NubSym1,+ NubBySym0, NubBySym1, NubBySym2,+ (:!!$), (:!!$$), (:!!$$$),+ ZipSym0, ZipSym1, ZipSym2,+ ZipWithSym0, ZipWithSym1, ZipWithSym2, ZipWithSym3,+ UnzipSym0, UnzipSym1,+ FromListSym0, FromListSym1,+ ToListSym0, ToListSym1,+ NonEmpty_Sym0, NonEmpty_Sym1,+ XorSym0, XorSym1+ ) where++import Data.List.NonEmpty+import Data.Singletons.Prelude.List.NonEmpty.Internal+import Data.Singletons.Prelude.Instances+import Data.Singletons.Prelude.Base hiding ( MapSym0, MapSym1, MapSym2, Map, sMap )+import Data.Singletons.Prelude.Maybe+import Data.Singletons.Prelude.Num+import Data.Singletons.Prelude.Bool+import Data.Singletons.Prelude.Eq+import Data.Singletons.Prelude.Ord+import Data.Singletons.Prelude.Function+import Data.Function+import Data.Ord+import Data.Singletons.TypeLits+import Data.Singletons.Single++$(singletonsOnly [d|+ {-+ -- | @since 4.9.0.0+ instance Exts.IsList (NonEmpty a) where+ type Item (NonEmpty a) = a+ fromList = fromList+ toList = toList++ -- | @since 4.9.0.0+ instance MonadFix NonEmpty where+ mfix f = case fix (f . head) of+ ~(x :| _) -> x :| mfix (tail . f)++ -- | @since 4.9.0.0+ instance MonadZip NonEmpty where+ mzip = zip+ mzipWith = zipWith+ munzip = unzip+ -}++ -- needed to implement other functions+ fmap :: (a -> b) -> NonEmpty a -> NonEmpty b+ fmap f (x :| xs) = f x :| listmap f xs++ -- | Number of elements in 'NonEmpty' list.+ length :: NonEmpty a -> Nat+ length (_ :| xs) = 1 + listlength xs++ -- | Compute n-ary logic exclusive OR operation on 'NonEmpty' list.+ xor :: NonEmpty Bool -> Bool+ xor (x :| xs) = foldr xor' x xs+ where xor' True y = not y+ xor' False y = y++ -- | 'unfold' produces a new stream by repeatedly applying the unfolding+ -- function to the seed value to produce an element of type @b@ and a new+ -- seed value. When the unfolding function returns 'Nothing' instead of+ -- a new seed value, the stream ends.+ unfold :: (a -> (b, Maybe a)) -> a -> NonEmpty b+ unfold f a = case f a of+ (b, Nothing) -> b :| []+ (b, Just c) -> b <| unfold f c++ -- | 'nonEmpty' efficiently turns a normal list into a 'NonEmpty' stream,+ -- producing 'Nothing' if the input is empty.+ nonEmpty_ :: [a] -> Maybe (NonEmpty a)+ nonEmpty_ [] = Nothing+ nonEmpty_ (a:as) = Just (a :| as)++ -- | 'uncons' produces the first element of the stream, and a stream of the+ -- remaining elements, if any.+ uncons :: NonEmpty a -> (a, Maybe (NonEmpty a))+ uncons (a :| as) = (a, nonEmpty_ as)++ -- | The 'unfoldr' function is analogous to "Data.List"'s+ -- 'Data.List.unfoldr' operation.+ unfoldr :: (a -> (b, Maybe a)) -> a -> NonEmpty b+ unfoldr f a = case f a of+ (b, mc) -> b :| maybe_ [] go mc+ where+ go c = case f c of+ (d, me) -> d : maybe_ [] go me++ {-+ -- | @since 4.9.0.0+ instance Functor NonEmpty where+ fmap f ~(a :| as) = f a :| fmap f as+ b <$ ~(_ :| as) = b :| (b <$ as)++ -- | @since 4.9.0.0+ instance Applicative NonEmpty where+ pure a = a :| []+ (<*>) = ap++ -- | @since 4.9.0.0+ instance Monad NonEmpty where+ ~(a :| as) >>= f = b :| (bs ++ bs')+ where b :| bs = f a+ bs' = as >>= toList . f++ -- | @since 4.9.0.0+ instance Traversable NonEmpty where+ traverse f ~(a :| as) = (:|) <$> f a <*> traverse f as++ -- | @since 4.9.0.0+ instance Foldable NonEmpty where+ foldr f z ~(a :| as) = f a (foldr f z as)+ foldl f z ~(a :| as) = foldl f (f z a) as+ foldl1 f ~(a :| as) = foldl f a as+ foldMap f ~(a :| as) = f a `mappend` foldMap f as+ fold ~(m :| ms) = m `mappend` fold ms+ -}++ -- | Extract the first element of the stream.+ head :: NonEmpty a -> a+ head (a :| _) = a++ -- | Extract the possibly-empty tail of the stream.+ tail :: NonEmpty a -> [a]+ tail (_ :| as) = as++ -- | Extract the last element of the stream.+ last :: NonEmpty a -> a+ last (a :| as) = listlast (a : as)++ -- | Extract everything except the last element of the stream.+ init :: NonEmpty a -> [a]+ init (a :| as) = listinit (a : as)++ -- | Prepend an element to the stream.+ (<|) :: a -> NonEmpty a -> NonEmpty a+ a <| (b :| bs) = a :| b : bs++ -- | Synonym for '<|'.+ cons :: a -> NonEmpty a -> NonEmpty a+ cons = (<|)++ -- | Sort a stream.+ sort :: Ord a => NonEmpty a -> NonEmpty a+ sort = lift listsort++ -- | Converts a normal list to a 'NonEmpty' stream.+ --+ -- Raises an error if given an empty list.+ fromList :: [a] -> NonEmpty a+ fromList (a:as) = a :| as+ fromList [] = error "NonEmpty.fromList: empty list"++ -- | Convert a stream to a normal list efficiently.+ toList :: NonEmpty a -> [a]+ toList (a :| as) = a : as++ -- | Lift list operations to work on a 'NonEmpty' stream.+ --+ -- /Beware/: If the provided function returns an empty list,+ -- this will raise an error.+ lift :: ([a] -> [b]) -> NonEmpty a -> NonEmpty b+ lift f = fromList . f . toList++ -- | Map a function over a 'NonEmpty' stream.+ map :: (a -> b) -> NonEmpty a -> NonEmpty b+ map f (a :| as) = f a :| listmap f as++ -- | The 'inits' function takes a stream @xs@ and returns all the+ -- finite prefixes of @xs@.+ inits :: [a] -> NonEmpty [a]+ inits = fromList . listinits++ -- | The 'tails' function takes a stream @xs@ and returns all the+ -- suffixes of @xs@.+ tails :: [a] -> NonEmpty [a]+ tails = fromList . listtails++ -- | @'insert' x xs@ inserts @x@ into the last position in @xs@ where it+ -- is still less than or equal to the next element. In particular, if the+ -- list is sorted beforehand, the result will also be sorted.+ insert :: Ord a => a -> [a] -> NonEmpty a+ insert a = fromList . listinsert a++ {-+ -- | @'some1' x@ sequences @x@ one or more times.+ some1 :: Alternative f => f a -> f (NonEmpty a)+ some1 x = (:|) <$> x <*> many x+ -}++ -- | 'scanl' is similar to 'foldl', but returns a stream of successive+ -- reduced values from the left:+ --+ -- > scanl f z [x1, x2, ...] == z :| [z `f` x1, (z `f` x1) `f` x2, ...]+ --+ -- Note that+ --+ -- > last (scanl f z xs) == foldl f z xs.+ scanl :: (b -> a -> b) -> b -> [a] -> NonEmpty b+ scanl f z = fromList . listscanl f z++ -- | 'scanr' is the right-to-left dual of 'scanl'.+ -- Note that+ --+ -- > head (scanr f z xs) == foldr f z xs.+ scanr :: (a -> b -> b) -> b -> [a] -> NonEmpty b+ scanr f z = fromList . listscanr f z++ -- | 'scanl1' is a variant of 'scanl' that has no starting value argument:+ --+ -- > scanl1 f [x1, x2, ...] == x1 :| [x1 `f` x2, x1 `f` (x2 `f` x3), ...]+ scanl1 :: (a -> a -> a) -> NonEmpty a -> NonEmpty a+ scanl1 f (a :| as) = fromList (listscanl f a as)++ -- | 'scanr1' is a variant of 'scanr' that has no starting value argument.+ scanr1 :: (a -> a -> a) -> NonEmpty a -> NonEmpty a+ scanr1 f (a :| as) = fromList (listscanr1 f (a:as))++ -- | 'intersperse x xs' alternates elements of the list with copies of @x@.+ --+ -- > intersperse 0 (1 :| [2,3]) == 1 :| [0,2,0,3]+ intersperse :: a -> NonEmpty a -> NonEmpty a+ intersperse a (b :| bs) = b :| case bs of+ [] -> []+ _:_ -> a : listintersperse a bs++ {-+ -- | @'iterate' f x@ produces the infinite sequence+ -- of repeated applications of @f@ to @x@.+ --+ -- > iterate f x = x :| [f x, f (f x), ..]+ iterate :: (a -> a) -> a -> NonEmpty a+ iterate f a = a :| listiterate f (f a)++ -- | @'cycle' xs@ returns the infinite repetition of @xs@:+ --+ -- > cycle (1 :| [2,3]) = 1 :| [2,3,1,2,3,...]+ cycle :: NonEmpty a -> NonEmpty a+ cycle = fromList . listcycle . toList+ -}++ -- | 'reverse' a finite NonEmpty stream.+ reverse :: NonEmpty a -> NonEmpty a+ reverse = lift listreverse++ {-+ -- | @'repeat' x@ returns a constant stream, where all elements are+ -- equal to @x@.+ repeat :: a -> NonEmpty a+ repeat a = a :| listrepeat a+ -}++ -- | @'take' n xs@ returns the first @n@ elements of @xs@.+ take :: Nat -> NonEmpty a -> [a]+ take n = listtake n . toList++ -- | @'drop' n xs@ drops the first @n@ elements off the front of+ -- the sequence @xs@.+ drop :: Nat -> NonEmpty a -> [a]+ drop n = listdrop n . toList++ -- | @'splitAt' n xs@ returns a pair consisting of the prefix of @xs@+ -- of length @n@ and the remaining stream immediately following this prefix.+ --+ -- > 'splitAt' n xs == ('take' n xs, 'drop' n xs)+ -- > xs == ys ++ zs where (ys, zs) = 'splitAt' n xs+ splitAt :: Nat -> NonEmpty a -> ([a],[a])+ splitAt n = listsplitAt n . toList++ -- | @'takeWhile' p xs@ returns the longest prefix of the stream+ -- @xs@ for which the predicate @p@ holds.+ takeWhile :: (a -> Bool) -> NonEmpty a -> [a]+ takeWhile p = listtakeWhile p . toList++ -- | @'dropWhile' p xs@ returns the suffix remaining after+ -- @'takeWhile' p xs@.+ dropWhile :: (a -> Bool) -> NonEmpty a -> [a]+ dropWhile p = listdropWhile p . toList++ -- | @'span' p xs@ returns the longest prefix of @xs@ that satisfies+ -- @p@, together with the remainder of the stream.+ --+ -- > 'span' p xs == ('takeWhile' p xs, 'dropWhile' p xs)+ -- > xs == ys ++ zs where (ys, zs) = 'span' p xs+ span :: (a -> Bool) -> NonEmpty a -> ([a], [a])+ span p = listspan p . toList++ -- | The @'break' p@ function is equivalent to @'span' (not . p)@.+ break :: (a -> Bool) -> NonEmpty a -> ([a], [a])+ break p = span (not . p)++ -- | @'filter' p xs@ removes any elements from @xs@ that do not satisfy @p@.+ filter :: (a -> Bool) -> NonEmpty a -> [a]+ filter p = listfilter p . toList++ -- | The 'partition' function takes a predicate @p@ and a stream+ -- @xs@, and returns a pair of lists. The first list corresponds to the+ -- elements of @xs@ for which @p@ holds; the second corresponds to the+ -- elements of @xs@ for which @p@ does not hold.+ --+ -- > 'partition' p xs = ('filter' p xs, 'filter' (not . p) xs)+ partition :: (a -> Bool) -> NonEmpty a -> ([a], [a])+ partition p = listpartition p . toList++ -- | The 'group' function takes a stream and returns a list of+ -- streams such that flattening the resulting list is equal to the+ -- argument. Moreover, each stream in the resulting list+ -- contains only equal elements. For example, in list notation:+ --+ -- > 'group' $ 'cycle' "Mississippi"+ -- > = "M" : "i" : "ss" : "i" : "ss" : "i" : "pp" : "i" : "M" : "i" : ...+ group :: Eq a => [a] -> [NonEmpty a]+ group = groupBy (==)++ -- | 'groupBy' operates like 'group', but uses the provided equality+ -- predicate instead of `==`.+ groupBy :: (a -> a -> Bool) -> [a] -> [NonEmpty a]+ groupBy eq0 = go eq0+ where+ go _ [] = []+ go eq (x : xs) = (x :| ys) : groupBy eq zs+ where (ys, zs) = listspan (eq x) xs++ -- | 'groupWith' operates like 'group', but uses the provided projection when+ -- comparing for equality+ groupWith :: Eq b => (a -> b) -> [a] -> [NonEmpty a]+ groupWith f = groupBy ((==) `on` f)++ -- | 'groupAllWith' operates like 'groupWith', but sorts the list+ -- first so that each equivalence class has, at most, one list in the+ -- output+ groupAllWith :: (Ord b) => (a -> b) -> [a] -> [NonEmpty a]+ groupAllWith f = groupWith f . listsortBy (compare `on` f)++ -- | 'group1' operates like 'group', but uses the knowledge that its+ -- input is non-empty to produce guaranteed non-empty output.+ group1 :: Eq a => NonEmpty a -> NonEmpty (NonEmpty a)+ group1 = groupBy1 (==)++ -- | 'groupBy1' is to 'group1' as 'groupBy' is to 'group'.+ groupBy1 :: (a -> a -> Bool) -> NonEmpty a -> NonEmpty (NonEmpty a)+ groupBy1 eq (x :| xs) = (x :| ys) :| groupBy eq zs+ where (ys, zs) = listspan (eq x) xs++ -- | 'groupWith1' is to 'group1' as 'groupWith' is to 'group'+ groupWith1 :: (Eq b) => (a -> b) -> NonEmpty a -> NonEmpty (NonEmpty a)+ groupWith1 f = groupBy1 ((==) `on` f)++ -- | 'groupAllWith1' is to 'groupWith1' as 'groupAllWith' is to 'groupWith'+ groupAllWith1 :: (Ord b) => (a -> b) -> NonEmpty a -> NonEmpty (NonEmpty a)+ groupAllWith1 f = groupWith1 f . sortWith f++ -- | The 'isPrefix' function returns @True@ if the first argument is+ -- a prefix of the second.+ isPrefixOf :: Eq a => [a] -> NonEmpty a -> Bool+ isPrefixOf [] _ = True+ isPrefixOf (y:ys) (x :| xs) = (y == x) && listisPrefixOf ys xs++ -- | @xs !! n@ returns the element of the stream @xs@ at index+ -- @n@. Note that the head of the stream has index 0.+ --+ -- /Beware/: a negative or out-of-bounds index will cause an error.+ (!!) :: NonEmpty a -> Nat -> a+ (!!) (x :| xs) n+ | n == 0 = x+ | n > 0 = xs `listindex` (n - 1)+ | otherwise = error "NonEmpty.!! negative argument"++ -- | The 'zip' function takes two streams and returns a stream of+ -- corresponding pairs.+ zip :: NonEmpty a -> NonEmpty b -> NonEmpty (a,b)+ zip (x :| xs) (y :| ys) = (x, y) :| listzip xs ys++ -- | The 'zipWith' function generalizes 'zip'. Rather than tupling+ -- the elements, the elements are combined using the function+ -- passed as the first argument.+ zipWith :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c+ zipWith f (x :| xs) (y :| ys) = f x y :| listzipWith f xs ys++ -- | The 'unzip' function is the inverse of the 'zip' function.+ unzip :: NonEmpty (a,b) -> (NonEmpty a, NonEmpty b)+ unzip ((a,b) :| asbs) = (a :| as, b :| bs)+ where+ (as, bs) = listunzip asbs++ -- | The 'nub' function removes duplicate elements from a list. In+ -- particular, it keeps only the first occurence of each element.+ -- (The name 'nub' means \'essence\'.)+ -- It is a special case of 'nubBy', which allows the programmer to+ -- supply their own inequality test.+ nub :: Eq a => NonEmpty a -> NonEmpty a+ nub = nubBy (==)++ -- | The 'nubBy' function behaves just like 'nub', except it uses a+ -- user-supplied equality predicate instead of the overloaded '=='+ -- function.+ nubBy :: (a -> a -> Bool) -> NonEmpty a -> NonEmpty a+ nubBy eq (a :| as) = a :| listnubBy eq (listfilter (\b -> not (eq a b)) as)++ -- | 'transpose' for 'NonEmpty', behaves the same as 'Data.List.transpose'+ -- The rows/columns need not be the same length, in which case+ -- > transpose . transpose /= id+ transpose :: NonEmpty (NonEmpty a) -> NonEmpty (NonEmpty a)+ transpose = fmap fromList+ . fromList . listtranspose . toList+ . fmap toList++ -- | 'sortBy' for 'NonEmpty', behaves the same as 'Data.List.sortBy'+ sortBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a+ sortBy f = lift (listsortBy f)++ -- | 'sortWith' for 'NonEmpty', behaves the same as:+ --+ -- > sortBy . comparing+ sortWith :: Ord o => (a -> o) -> NonEmpty a -> NonEmpty a+ sortWith = sortBy . comparing++ |])
+ src/Data/Singletons/Prelude/List/NonEmpty/Internal.hs view
@@ -0,0 +1,133 @@+-----------------------------------------------------------------------------+-- |+-- Module : Data.Singletons.Prelude.List.NonEmpty.Internal+-- Copyright : (C) 2016 Richard Eisenberg+-- License : BSD-style (see LICENSE)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu)+-- Stability : experimental+-- Portability : non-portable+--+-- Renames a bunch of List functions because singletons can't support qualified+-- names. :(+--+----------------------------------------------------------------------------++{-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeInType, TypeFamilies,+ UndecidableInstances, GADTs #-}+{-# OPTIONS_GHC -Wno-missing-signatures #-}++module Data.Singletons.Prelude.List.NonEmpty.Internal where++import Data.Singletons.Single+import Data.Singletons.Prelude.List+import Data.Singletons.Prelude.Ord+import Data.Singletons.Prelude.Eq+import Data.List+import GHC.TypeLits++-- singletons doesn't support qualified names :(+$(singletons [d|+ listlast :: [a] -> a+ listlast = last++ listinit :: [a] -> [a]+ listinit = init++ listsort :: Ord a => [a] -> [a]+ listsort = sort++ listinits :: [a] -> [[a]]+ listinits = inits++ listtails :: [a] -> [[a]]+ listtails = tails++ listinsert :: Ord a => a -> [a] -> [a]+ listinsert = insert++ listscanl :: (b -> a -> b) -> b -> [a] -> [b]+ listscanl = scanl++ listscanr :: (a -> b -> b) -> b -> [a] -> [b]+ listscanr = scanr++ listscanr1 :: (a -> a -> a) -> [a] -> [a]+ listscanr1 = scanr1++ listintersperse :: a -> [a] -> [a]+ listintersperse = intersperse++ listreverse :: [a] -> [a]+ listreverse = reverse++ listtakeWhile :: (a -> Bool) -> [a] -> [a]+ listtakeWhile = takeWhile++ listdropWhile :: (a -> Bool) -> [a] -> [a]+ listdropWhile = dropWhile++ listspan :: (a -> Bool) -> [a] -> ([a], [a])+ listspan = span++ listfilter :: (a -> Bool) -> [a] -> [a]+ listfilter = filter++ listpartition :: (a -> Bool) -> [a] -> ([a], [a])+ listpartition = partition++ listsortBy :: (a -> a -> Ordering) -> [a] -> [a]+ listsortBy = sortBy++ listisPrefixOf :: Eq a => [a] -> [a] -> Bool+ listisPrefixOf = isPrefixOf++ listzip :: [a] -> [b] -> [(a, b)]+ listzip = zip++ listzipWith :: (a -> b -> c) -> [a] -> [b] -> [c]+ listzipWith = zipWith++ listnubBy :: (a -> a -> Bool) -> [a] -> [a]+ listnubBy = nubBy++ listtranspose :: [[a]] -> [[a]]+ listtranspose = transpose++ listunzip :: [(a,b)] -> ([a],[b])+ listunzip = unzip++ listmap :: (a -> b) -> [a] -> [b]+ listmap = map+ |])++$(singletonsOnly [d|+ listtake :: Nat -> [a] -> [a]+ listtake = take++ listdrop :: Nat -> [a] -> [a]+ listdrop = drop++ listsplitAt :: Nat -> [a] -> ([a], [a])+ listsplitAt = splitAt++ listindex :: [a] -> Nat -> a+ listindex = (!!)++ listlength :: [a] -> Nat+ listlength = length+ |])++listtake :: Nat -> [a] -> [a]+listtake = undefined++listdrop :: Nat -> [a] -> [a]+listdrop = undefined++listsplitAt :: Nat -> [a] -> ([a], [a])+listsplitAt = undefined++listindex :: [a] -> Nat -> a+listindex = undefined++listlength :: [a] -> Nat+listlength = undefined
src/Data/Singletons/Prelude/Maybe.hs view
@@ -6,7 +6,7 @@ -- Module : Data.Singletons.Prelude.Maybe -- Copyright : (C) 2013-2014 Richard Eisenberg, Jan Stolarek -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --@@ -56,7 +56,6 @@ ) where import Data.Singletons.Prelude.Instances-import Data.Singletons import Data.Singletons.TH import Data.Singletons.TypeLits
src/Data/Singletons/Prelude/Num.hs view
@@ -8,7 +8,7 @@ -- Module : Data.Singletons.Prelude.Num -- Copyright : (C) 2014 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --@@ -72,7 +72,7 @@ SignumNat 0 = 0 SignumNat x = 1 -instance PNum ('Proxy :: Proxy Nat) where+instance PNum Nat where type a :+ b = a + b type a :- b = a - b type a :* b = a * b
src/Data/Singletons/Prelude/Ord.hs view
@@ -7,7 +7,7 @@ -- Module : Data.Singletons.Prelude.Ord -- Copyright : (C) 2013 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --@@ -19,6 +19,8 @@ module Data.Singletons.Prelude.Ord ( POrd(..), SOrd(..), + Comparing, sComparing,+ -- | 'thenCmp' returns its second argument if its first is 'EQ'; otherwise, -- it returns its first argument. thenCmp, ThenCmp, sThenCmp,@@ -34,7 +36,8 @@ (:>$), (:>$$), (:>$$$), (:>=$), (:>=$$), (:>=$$$), MaxSym0, MaxSym1, MaxSym2,- MinSym0, MinSym1, MinSym2+ MinSym0, MinSym1, MinSym2,+ ComparingSym0, ComparingSym1, ComparingSym2, ComparingSym3 ) where import Data.Singletons.Single@@ -70,6 +73,15 @@ min x y = if x <= y then x else y -- Not handled by TH: {-# MINIMAL compare | (<=) #-} + -- |+ -- > comparing p x y = compare (p x) (p y)+ --+ -- Useful combinator for use in conjunction with the @xxxBy@ family+ -- of functions from "Data.List", for example:+ --+ -- > ... sortBy (comparing fst) ...+ comparing :: (Ord a) => (b -> a) -> b -> b -> Ordering+ comparing p x y = compare (p x) (p y) |]) $(singletons [d|
src/Data/Singletons/Prelude/Tuple.hs view
@@ -6,7 +6,7 @@ -- Module : Data.Singletons.Tuple -- Copyright : (C) 2013 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --
src/Data/Singletons/Promote.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Promote.hs (c) Richard Eisenberg 2013-eir@cis.upenn.edu+rae@cs.brynmawr.edu This file contains functions to promote term-level constructs to the type level. It is an internal module to the singletons package.@@ -124,6 +124,8 @@ fail "Promotion of individual values not supported" promoteInfo (DTyVarI _name _ty) = fail "Promotion of individual type variables not supported"+promoteInfo (DPatSynI {}) =+ fail "Promotion of pattern synonyms not supported" -- Note [Promoting declarations in two stages] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -189,7 +191,7 @@ let arg_ty = foldType (DConT data_name) (map tvbToType tvbs) in- concatMapM (getRecordSelectors arg_ty) cons+ getRecordSelectors arg_ty cons -- curious about ALetDecEnv? See the LetDecEnv module for an explanation. promoteLetDecs :: (String, String) -- (alpha, symb) prefixes to use@@ -232,20 +234,38 @@ ctorSyms <- buildDefunSymsDataD name tvbs ctors emitDecs ctorSyms +-- Note [CUSKification]+-- ~~~~~~~~~~~~~~~~~~~~+-- GHC #12928 means that sometimes, this TH code will produce a declaration+-- that has a kind signature even when we want kind inference to work. There+-- seems to be no way to avoid this, so we embrace it:+--+-- * If a class type variable has no explicit kind, we make no effort to+-- guess it and default to *. This is OK because before TypeInType we were+-- limited by KProxy anyway.+--+-- * If a class type variable has an explicit kind, it is preserved.+--+-- This way, we always get proper CUSKs where we need them.+ promoteClassDec :: UClassDecl -> PrM AClassDecl promoteClassDec decl@(ClassDecl { cd_cxt = cxt , cd_name = cls_name- , cd_tvbs = tvbs+ , cd_tvbs = tvbs' , cd_fds = fundeps , cd_lde = lde@LetDecEnv { lde_defns = defaults , lde_types = meth_sigs , lde_infix = infix_decls } }) = do+ let+ -- a workaround for GHC Trac #12928; see Note [CUSKification]+ cuskify :: DTyVarBndr -> DTyVarBndr+ cuskify (DPlainTV tvname) = DKindedTV tvname DStarT+ cuskify tv = tv+ tvbs = map cuskify tvbs' let pClsName = promoteClassName cls_name- (ptvbs, proxyCxt) <- mkKProxies (map extractTvbName tvbs) pCxt <- mapM promote_superclass_pred cxt- let cxt' = pCxt ++ proxyCxt sig_decs <- mapM (uncurry promote_sig) (Map.toList meth_sigs) let defaults_list = Map.toList defaults defaults_names = map fst defaults_list@@ -255,7 +275,7 @@ let infix_decls' = catMaybes $ map (uncurry promoteInfixDecl) infix_decls -- no need to do anything to the fundeps. They work as is!- emitDecs [DClassD cxt' pClsName ptvbs fundeps+ emitDecs [DClassD pCxt pClsName tvbs fundeps (sig_decs ++ default_decs ++ infix_decls')] let defaults_list' = zip defaults_names ann_rhss proms = zip defaults_names prom_rhss@@ -277,7 +297,7 @@ promote_superclass_pred :: DPred -> PrM DPred promote_superclass_pred = go where- go (DAppPr pr ty) = DAppPr <$> go pr <*> fmap kindParam (promoteType ty)+ go (DAppPr pr ty) = DAppPr <$> go pr <*> promoteType ty go (DSigPr pr _k) = go pr -- just ignore the kind; it can't matter go (DVarPr name) = fail $ "Cannot promote ConstraintKinds variables like " ++ show name@@ -295,7 +315,7 @@ let subst = Map.fromList $ zip cls_tvb_names inst_kis (meths', ann_rhss, _) <- mapAndUnzip3M (promoteMethod (Just subst) meth_sigs) meths emitDecs [DInstanceD Nothing [] (foldType (DConT pClsName)- (map kindParam inst_kis)) meths']+ inst_kis) meths'] return (decl { id_meths = zip (map fst meths) ann_rhss }) where pClsName = promoteClassName cls_name@@ -304,17 +324,13 @@ lookup_cls_tvb_names = do mb_info <- dsReify pClsName case mb_info of- Just (DTyConI (DClassD _ _ tvbs _ _) _) -> return (map extract_kv_name tvbs)+ Just (DTyConI (DClassD _ _ tvbs _ _) _) -> return (map extractTvbName tvbs) _ -> do mb_info' <- dsReify cls_name case mb_info' of Just (DTyConI (DClassD _ _ tvbs _ _) _) -> return (map extractTvbName tvbs) _ -> fail $ "Cannot find class declaration annotation for " ++ show cls_name - extract_kv_name :: DTyVarBndr -> Name- extract_kv_name (DKindedTV _ (DConT _kproxy `DAppT` DVarT kv_name)) = kv_name- extract_kv_name tvb = error $ "Internal error: extract_kv_name\n" ++ show tvb- -- promoteMethod needs to substitute in a method's kind because GHC does not do -- enough kind checking of associated types. See GHC#9063. When that bug is fixed, -- the substitution code can be removed.@@ -495,54 +511,54 @@ promoteClause (DClause pats exp) = do -- promoting the patterns creates variable bindings. These are passed -- to the function promoted the RHS- ((types, pats'), new_vars) <- evalForPair $ mapAndUnzipM promotePat pats+ (types, new_vars) <- evalForPair $ mapM promotePat pats (ty, ann_exp) <- lambdaBind new_vars $ promoteExp exp all_locals <- allLocals -- these are bound *outside* of this clause return ( DTySynEqn (map DVarT all_locals ++ types) ty- , ADClause new_vars pats' ann_exp )+ , ADClause new_vars pats ann_exp ) -promoteMatch :: DType -> DMatch -> PrM (DTySynEqn, ADMatch)-promoteMatch prom_case (DMatch pat exp) = do+promoteMatch :: DMatch -> PrM (DTySynEqn, ADMatch)+promoteMatch (DMatch pat exp) = do -- promoting the patterns creates variable bindings. These are passed -- to the function promoted the RHS- ((ty, pat'), new_vars) <- evalForPair $ promotePat pat+ (ty, new_vars) <- evalForPair $ promotePat pat (rhs, ann_exp) <- lambdaBind new_vars $ promoteExp exp all_locals <- allLocals return $ ( DTySynEqn (map DVarT all_locals ++ [ty]) rhs- , ADMatch new_vars prom_case pat' ann_exp)+ , ADMatch new_vars pat ann_exp) -- promotes a term pattern into a type pattern, accumulating bound variable names--- See Note [No wildcards in singletons]-promotePat :: DPat -> QWithAux VarPromotions PrM (DType, DPat)+promotePat :: DPat -> QWithAux VarPromotions PrM DType promotePat (DLitPa lit) = do lit' <- promoteLitPat lit- return (lit', DLitPa lit)+ return lit' promotePat (DVarPa name) = do -- term vars can be symbols... type vars can't! tyName <- mkTyName name addElement (name, tyName)- return (DVarT tyName, DVarPa name)+ return $ DVarT tyName promotePat (DConPa name pats) = do- (types, pats') <- mapAndUnzipM promotePat pats+ types <- mapM promotePat pats let name' = unboxed_tuple_to_tuple name- return (foldType (DConT name') types, DConPa name pats')+ return $ foldType (DConT name') types where unboxed_tuple_to_tuple n | Just deg <- unboxedTupleNameDegree_maybe n = tupleDataName deg | otherwise = n promotePat (DTildePa pat) = do qReportWarning "Lazy pattern converted into regular pattern in promotion"- (ty, pat') <- promotePat pat- return (ty, DTildePa pat')+ promotePat pat promotePat (DBangPa pat) = do qReportWarning "Strict pattern converted into regular pattern in promotion"- (ty, pat') <- promotePat pat- return (ty, DBangPa pat')+ promotePat pat+promotePat (DSigPa pat ty) = do+ promoted <- promotePat pat+ ki <- promoteType ty+ return $ DSigT promoted ki promotePat DWildPa = do name <- newUniqueName "_z" tyName <- mkTyName name- addElement (name, tyName)- return (DVarT tyName, DVarPa name)+ return $ DVarT tyName promoteExp :: DExp -> PrM (DType, ADExp) promoteExp (DVarE name) = fmap (, ADVarE name) $ lookupVarE name@@ -552,6 +568,10 @@ (exp1', ann_exp1) <- promoteExp exp1 (exp2', ann_exp2) <- promoteExp exp2 return (apply exp1' exp2', ADAppE ann_exp1 ann_exp2)+-- Until we get visible kind applications, this is the best we can do.+promoteExp (DAppTypeE exp _) = do+ qReportWarning "Visible type applications are ignored by `singletons`."+ promoteExp exp promoteExp (DLamE names exp) = do lambdaName <- newUniqueName "Lambda" tyNames <- mapM mkTyName names@@ -571,13 +591,13 @@ emitDecsM $ defunctionalize lambdaName (map (const Nothing) all_args) Nothing let promLambda = foldl apply (DConT (promoteTySym lambdaName 0)) (map DVarT all_locals)- return (promLambda, ADLamE var_proms promLambda names ann_exp)+ return (promLambda, ADLamE tyNames promLambda names ann_exp) promoteExp (DCaseE exp matches) = do caseTFName <- newUniqueName "Case" all_locals <- allLocals let prom_case = foldType (DConT caseTFName) (map DVarT all_locals) (exp', ann_exp) <- promoteExp exp- (eqns, ann_matches) <- mapAndUnzipM (promoteMatch prom_case) matches+ (eqns, ann_matches) <- mapAndUnzipM promoteMatch matches tyvarName <- qNewName "t" let all_args = all_locals ++ [tyvarName] tvbs = map DPlainTV all_args@@ -585,7 +605,7 @@ -- See Note [Annotate case return type] in Single let applied_case = prom_case `DAppT` exp' return ( applied_case- , ADCaseE ann_exp exp' ann_matches applied_case )+ , ADCaseE ann_exp ann_matches applied_case ) promoteExp (DLetE decs exp) = do unique <- qNewUnique let letPrefixes = uniquePrefixes "Let" ":<<<" unique
src/Data/Singletons/Promote/Defun.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Promote/Defun.hs (c) Richard Eisenberg, Jan Stolarek 2014-eir@cis.upenn.edu+rae@cs.brynmawr.edu This file creates defunctionalization symbols for types during promotion. -}@@ -27,6 +27,8 @@ fail "Building defunctionalization symbols of values not supported" defunInfo (DTyVarI _name _ty) = fail "Building defunctionalization symbols of type variables not supported"+defunInfo (DPatSynI {}) =+ fail "Building defunctionalization symbols of pattern synonyms not supported" buildDefunSyms :: DDec -> PrM [DDec] buildDefunSyms (DDataD _new_or_data _cxt tyName tvbs ctors _derivings) =@@ -43,6 +45,9 @@ buildDefunSyms (DTySynD name tvbs _type) = do let arg_m_kinds = map extractTvbKind tvbs defunctionalize name arg_m_kinds Nothing+buildDefunSyms (DClassD _cxt name tvbs _fundeps _members) = do+ let arg_m_kinds = map extractTvbKind tvbs+ defunctionalize name arg_m_kinds (Just (DConT constraintName)) buildDefunSyms _ = fail $ "Defunctionalization symbols can only be built for " ++ "type families and data declarations" @@ -69,18 +74,15 @@ -- -- type FooSym3 a b c = Foo a b c -- data FooSym2 a b f where--- FooSym2KindInference :: KindOf (Apply (FooSym2 a b) arg)--- ~ KindOf (FooSym3 a b arg)+-- 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 :: KindOf (Apply (FooSym1 a) arg)--- ~ KindOf (FooSym2 a arg)+-- 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 :: KindOf (Apply FooSym0 arg)--- ~ KindOf (FooSym1 arg)+-- FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) -- => FooSym0 f -- type instance Apply FooSym0 a = FooSym1 a --@@ -101,9 +103,9 @@ num_args = length m_arg_kinds sat_name = promoteTySym name num_args tvbNames <- replicateM num_args $ qNewName "t"- let sat_dec = DTySynD sat_name (zipWith mk_tvb tvbNames m_arg_kinds)- (foldType (DConT name) (map DVarT tvbNames))- other_decs <- go (num_args - 1) (reverse m_arg_kinds) m_res_kind+ let mk_rhs ns = foldType (DConT name) (map DVarT ns)+ sat_dec = DTySynD sat_name (zipWith mk_tvb tvbNames m_arg_kinds) (mk_rhs tvbNames)+ other_decs <- go (num_args - 1) (reverse m_arg_kinds) m_res_kind mk_rhs return $ sat_dec : other_decs where mk_tvb :: Name -> Maybe DKind -> DTyVarBndr@@ -116,27 +118,25 @@ let (_, _, argKs, resultK) = unravel res_kind in (m_arg_kinds ++ (map Just argKs), Just resultK) - go :: Int -> [Maybe DKind] -> Maybe DKind -> PrM [DDec]- go _ [] _ = return []- go n (m_arg : m_args) m_result = do- decls <- go (n - 1) m_args (addStar_maybe (buildTyFun_maybe m_arg m_result))+ go :: Int -> [Maybe DKind] -> Maybe DKind+ -> ([Name] -> DType) -- given the argument names, the RHS of the Apply instance+ -> PrM [DDec]+ go _ [] _ _ = return []+ go n (m_arg : m_args) m_result mk_rhs = do fst_name : rest_names <- replicateM (n + 1) (qNewName "l") extra_name <- qNewName "arg" let data_name = promoteTySym name n next_name = promoteTySym name (n+1)- con_name = suffixName "KindInference" "###" data_name+ con_name = suffixName "KindInference" "###" (toDataConName data_name) m_tyfun = buildTyFun_maybe m_arg m_result arg_params = zipWith mk_tvb rest_names (reverse m_args) tyfun_param = mk_tvb fst_name m_tyfun arg_names = map extractTvbName arg_params params = arg_params ++ [tyfun_param]- con_eq_ct = mkEqPred- (DConT kindOfName `DAppT`- (foldType (DConT data_name) (map DVarT arg_names)- `apply`- (DVarT extra_name)))- (DConT kindOfName `DAppT`- foldType (DConT next_name) (map DVarT (arg_names ++ [extra_name])))+ con_eq_ct = DConPr sameKindName `DAppPr` lhs `DAppPr` 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 [DPlainTV extra_name] [con_eq_ct] con_name@@ -146,8 +146,7 @@ app_eqn = DTySynEqn [ foldType (DConT data_name) (map DVarT rest_names) , DVarT fst_name ]- (foldType (DConT (promoteTySym name (n+1)))- (map DVarT (rest_names ++ [fst_name])))+ (mk_rhs (rest_names ++ [fst_name])) app_decl = DTySynInstD applyName app_eqn suppress = DInstanceD Nothing [] (DConT suppressClassName `DAppT` DConT data_name)@@ -156,6 +155,10 @@ ((DVarE 'snd) `DAppE` mkTupleDExp [DConE con_name, mkTupleDExp []])]]++ mk_rhs' ns = foldType (DConT data_name) (map DVarT ns)++ decls <- go (n - 1) m_args (addStar_maybe (buildTyFun_maybe m_arg m_result)) mk_rhs' return $ suppress : data_decl : app_decl : decls buildTyFun :: DKind -> DKind -> DKind
src/Data/Singletons/Promote/Eq.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Promote/Eq.hs (c) Richard Eisenberg 2014-eir@cis.upenn.edu+rae@cs.brynmawr.edu This module defines the functions that generate type-level equality type family instances.@@ -35,7 +35,7 @@ (foldType (DConT helperName) [DVarT aName, DVarT bName])) inst = DInstanceD Nothing [] ((DConT $ promoteClassName eqName) `DAppT`- kindParam kind) [eqInst]+ kind) [eqInst] return [closedFam, inst]
src/Data/Singletons/Promote/Monad.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Promote/Monad.hs (c) Richard Eisenberg 2014-eir@cis.upenn.edu+rae@cs.brynmawr.edu This file defines the PrM monad and its operations, for use during promotion.
src/Data/Singletons/Promote/Type.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Type.hs (c) Richard Eisenberg 2013-eir@cis.upenn.edu+rae@cs.brynmawr.edu This file implements promotion of types into kinds. -}@@ -29,10 +29,17 @@ go args (DAppT t1 t2) = do k2 <- go [] t2 go (k2 : args) t1- go args (DSigT ty _) = go args ty -- just ignore signatures- go [] (DVarT name) = return $ DVarT name- go _ (DVarT name) = fail $ "Cannot promote an applied type variable " ++- show name ++ "."+ -- NB: This next case means that promoting something like+ -- (((->) a) :: Type -> Type) b+ -- will fail because the pattern below won't recognize the+ -- arrow to turn it into a TyFun. But I'm not terribly+ -- bothered by this, and it would be annoying to fix. Wait+ -- for someone to report.+ go args (DSigT ty ki) = do+ ty' <- go [] ty+ -- No need to promote 'ki' - it is already a kind.+ return $ foldType (DSigT ty' ki) args+ go args (DVarT name) = return $ foldType (DVarT name) args go [] (DConT name) | name == typeRepName = return DStarT | name == stringName = return $ DConT symbolName
src/Data/Singletons/Single.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Single.hs (c) Richard Eisenberg 2013-eir@cis.upenn.edu+rae@cs.brynmawr.edu This file contains functions to refine constructs to work with singleton types. It is an internal module to the singletons package.@@ -24,6 +24,7 @@ import Data.Singletons.Single.Monad import Data.Singletons.Single.Type import Data.Singletons.Single.Data+import Data.Singletons.Single.Fixity import Data.Singletons.Single.Eq import Data.Singletons.Syntax import Data.Singletons.Partition@@ -82,7 +83,7 @@ -- | Make promoted and singleton versions of all declarations given, retaining -- the original declarations.--- See <http://www.cis.upenn.edu/~eir/packages/singletons/README.html> for+-- See <https://github.com/goldfirere/singletons/blob/master/README.md> for -- further explanation. singletons :: DsMonad q => q [Dec] -> q [Dec] singletons qdecs = do@@ -188,6 +189,8 @@ fail "Singling of value info not supported" singInfo (DTyVarI _name _ty) = fail "Singling of type variable info not supported"+singInfo (DPatSynI {}) =+ fail "Singling of pattern synonym info not supported" singTopLevelDecs :: DsMonad q => [Dec] -> [DDec] -> q [DDec] singTopLevelDecs locals raw_decls = do@@ -256,7 +259,7 @@ (sing_sigs, _, tyvar_names, res_kis) <- unzip4 <$> zipWithM (singTySig no_meth_defns meth_sigs) meth_names (map promoteValRhs meth_names)- let default_sigs = catMaybes $ zipWith mk_default_sig meth_names sing_sigs+ let default_sigs = catMaybes $ zipWith3 mk_default_sig meth_names sing_sigs res_kis res_ki_map = Map.fromList (zip meth_names (map (fromMaybe always_sig) res_kis)) sing_meths <- mapM (uncurry (singLetDecRHS (Map.fromList tyvar_names)@@ -274,14 +277,17 @@ always_sig = error "Internal error: no signature for default method" meth_names = Map.keys meth_sigs - mk_default_sig meth_name (DSigD s_name sty) =- DDefaultSigD s_name <$> add_constraints meth_name sty- mk_default_sig _ _ = error "Internal error: a singled signature isn't a signature."+ mk_default_sig meth_name (DSigD s_name sty) (Just res_ki) =+ DDefaultSigD s_name <$> add_constraints meth_name sty res_ki+ mk_default_sig _ _ _ = error "Internal error: a singled signature isn't a signature." - add_constraints meth_name sty = do -- Maybe monad+ add_constraints meth_name sty res_ki = do -- Maybe monad prom_dflt <- Map.lookup meth_name promoted_defaults let default_pred = foldl DAppPr (DConPr equalityName)- [ foldApply (promoteValRhs meth_name) tvs+ -- NB: Need the res_ki here to prevent ambiguous+ -- kinds in result-inferred default methods.+ -- See #175+ [ foldApply (promoteValRhs meth_name) tvs `DSigT` res_ki , foldApply prom_dflt tvs ] return $ DForallT tvbs (default_pred : cxt) (ravel args res) where@@ -307,13 +313,11 @@ sing_meth name rhs = do mb_s_info <- dsReify (singValName name) (s_ty, tyvar_names, m_res_ki) <- case mb_s_info of- Just (DVarI _ (DForallT cls_kproxy_tvbs _cls_pred s_ty) _) -> do- -- GHC 8 quantifies over the kind vars explicitly- let class_kvs = [ class_kv | DKindedTV class_kv DStarT <- cls_kproxy_tvbs ]- (sing_tvbs, _pred, _args, res_ty) = unravel s_ty-+ Just (DVarI _ (DForallT cls_tvbs _cls_pred s_ty) _) -> do+ let (sing_tvbs, _pred, _args, res_ty) = unravel s_ty inst_kis <- mapM promoteType inst_tys- let subst = Map.fromList (zip class_kvs inst_kis)+ let subst = Map.fromList (zip (map extractTvbName cls_tvbs)+ inst_kis) m_res_ki = case res_ty of _sing `DAppT` (_prom_func `DSigT` res_ki) -> Just (substKind subst res_ki) _ -> Nothing@@ -325,8 +329,11 @@ Just (DVarI _ (DForallT cls_tvbs _cls_pred inner_ty) _) -> do let subst = Map.fromList (zip (map extractTvbName cls_tvbs) inst_tys)+ -- Make sure to expand through type synonyms here! Not doing so+ -- resulted in #167.+ raw_ty <- expand inner_ty (s_ty, _num_args, tyvar_names, res_ki) <- singType (promoteValRhs name)- (substType subst inner_ty)+ (substType subst raw_ty) return (s_ty, tyvar_names, Just res_ki) _ -> fail $ "Cannot find type of method " ++ show name @@ -353,15 +360,6 @@ thing <- thing_inside return (infix_decls' ++ typeSigs ++ let_decs, thing) -singInfixDecl :: Fixity -> Name -> DLetDec-singInfixDecl fixity name- | isUpcase name =- -- is it a tycon name or a datacon name??- -- it *must* be a datacon name, because symbolic tycons- -- can't be promoted. This is terrible.- DInfixD fixity (singDataConName name)- | otherwise = DInfixD fixity (singValName name)- singTySig :: Map Name ALetDecRHS -- definitions -> Map Name DType -- type signatures -> Name -> DType -- the type is the promoted type, not the type sig!@@ -430,19 +428,15 @@ -> ADClause -> SgM DClause singClause prom_fun num_arrows bound_names res_ki (ADClause var_proms pats exp) = do- (sPats, prom_pats)- <- mapAndUnzipM (singPat (Map.fromList var_proms) Parameter) pats- let bound_name_tys = map DVarT bound_names- equalities = zip bound_name_tys prom_pats- -- This res_ki stuff is necessary when we need to propagate result-- -- based type-inference. It was inspired by toEnum. (If you remove- -- this, that should fail to compile.)- applied_ty = foldl apply prom_fun bound_name_tys `maybeSigT` res_ki- -- We used to use prom_pats as the arguments above, but bound_name_tys- -- is better, because the type variables have kinds. When the pattern- -- is, say, [], then we get a kind ambiguity. See #136.- sBody <- bindTyVarsEq var_proms applied_ty equalities $ singExp exp res_ki- -- when calling unSingFun, the prom_pats aren't in scope, so we use the++ -- Fix #166:+ when (num_arrows - length pats < 0) $+ fail $ "Function being promoted to " ++ (pprint (typeToTH prom_fun)) +++ " has too many arguments."++ sPats <- mapM (singPat (Map.fromList var_proms) Parameter) pats+ sBody <- singExp exp res_ki+ -- when calling unSingFun, the promoted pats aren't in scope, so we use the -- bound_names instead let pattern_bound_names = zipWith const bound_names pats -- this does eta-expansion. See comment at top of file.@@ -464,19 +458,10 @@ fail $ "Can't use a singleton pattern outside of a case-statement or\n" ++ "do expression: GHC's brain will explode if you try. (Do try it!)" --- Note [No wildcards in singletons]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ We forbid patterns with wildcards during singletonization. Why? Because--- singletonizing a pattern also must produce a type expression equivalent--- to the pattern, for use in bindTyVars. Wildcards get in the way of this.--- Thus, we de-wild patterns during promotion, and put the de-wilded patterns--- in the ADExp AST.- singPat :: Map Name Name -- from term-level names to type-level names -> PatternContext -> DPat- -> SgM (DPat, DType) -- the type form of the pat+ -> SgM DPat singPat _var_proms _patCxt (DLitPa _lit) = fail "Singling of literal patterns not yet supported" singPat var_proms _patCxt (DVarPa name) = do@@ -484,23 +469,22 @@ Nothing -> fail "Internal error: unknown variable when singling pattern" Just tyname -> return tyname- return (DVarPa (singValName name), DVarT tyname)+ return $ DVarPa (singValName name) `DSigPa` (singFamily `DAppT` DVarT tyname) singPat var_proms patCxt (DConPa name pats) = do checkIfBrainWillExplode patCxt- (pats', tys) <- mapAndUnzipM (singPat var_proms patCxt) pats- return ( DConPa (singDataConName name) pats'- , foldl apply (promoteValRhs name) tys )+ pats' <- mapM (singPat var_proms patCxt) pats+ return $ DConPa (singDataConName name) pats' singPat var_proms patCxt (DTildePa pat) = do qReportWarning "Lazy pattern converted into regular pattern during singleton generation." singPat var_proms patCxt pat singPat var_proms patCxt (DBangPa pat) = do- (pat', ty) <- singPat var_proms patCxt pat- return (DBangPa pat', ty)-singPat _var_proms _patCxt DWildPa =- -- See Note [No wildcards in singletons]- fail "Internal error: wildcard seen during singleton generation"+ pat' <- singPat var_proms patCxt pat+ return $ DBangPa pat'+singPat _var_proms _patCxt (DSigPa _pat _ty) = error "TODO: Handle SigPa. See Issue #183."+singPat _var_proms _patCxt DWildPa = return DWildPa + -- Note [Annotate case return type] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --@@ -542,14 +526,20 @@ if isException e1' then return e1' else return $ (DVarE applySingName) `DAppE` e1' `DAppE` e2'-singExp (ADLamE var_proms prom_lam names exp) _res_ki = do+singExp (ADLamE ty_names prom_lam names exp) _res_ki = do let sNames = map singValName names- exp' <- bindTyVars var_proms (foldl apply prom_lam (map (DVarT . snd) var_proms)) $- singExp exp Nothing- return $ wrapSingFun (length names) prom_lam $ DLamE sNames exp'-singExp (ADCaseE exp prom_exp matches ret_ty) res_ki =+ exp' <- singExp exp Nothing+ -- we need to bind the type variables... but DLamE doesn't allow SigT patterns.+ -- So: build a case+ let caseExp = DCaseE (mkTupleDExp (map DVarE sNames))+ [DMatch (mkTupleDPat+ (map ((DWildPa `DSigPa`) .+ (singFamily `DAppT`) .+ DVarT) ty_names)) exp']+ return $ wrapSingFun (length names) prom_lam $ DLamE sNames caseExp+singExp (ADCaseE exp matches ret_ty) res_ki = -- See Note [Annotate case return type]- DSigE <$> (DCaseE <$> singExp exp Nothing <*> mapM (singMatch prom_exp res_ki) matches)+ DSigE <$> (DCaseE <$> singExp exp Nothing <*> mapM (singMatch res_ki) matches) <*> pure (singFamily `DAppT` (ret_ty `maybeSigT` res_ki)) singExp (ADLetE env exp) res_ki = uncurry DLetE <$> singLetDecEnv env (singExp exp res_ki)@@ -562,27 +552,18 @@ isException (DLitE {}) = False isException (DAppE (DVarE fun) _) | nameBase fun == "sError" = True isException (DAppE fun _) = isException fun+isException (DAppTypeE e _) = isException e isException (DLamE _ _) = False isException (DCaseE e _) = isException e isException (DLetE _ e) = isException e isException (DSigE e _) = isException e isException (DStaticE e) = isException e -singMatch :: DType -- ^ the promoted scrutinee- -> Maybe DKind -- ^ the result kind, if known+singMatch :: Maybe DKind -- ^ the result kind, if known -> ADMatch -> SgM DMatch-singMatch prom_scrut res_ki (ADMatch var_proms prom_match pat exp) = do- (sPat, prom_pat)- <- singPat (Map.fromList var_proms) CaseStatement pat- -- why DAppT below? See comment near decl of ADMatch in LetDecEnv.- let equality- | DVarPa _ <- pat- , (ADVarE err) `ADAppE` _ <- exp- , err == errorName -- See Note [Why error is so special]- = [] -- no equality from impossible case.- | otherwise = [(prom_pat, prom_scrut)]- sExp <- bindTyVarsEq var_proms (prom_match `DAppT` prom_pat `maybeSigT` res_ki) equality $- singExp exp res_ki+singMatch res_ki (ADMatch var_proms pat exp) = do+ sPat <- singPat (Map.fromList var_proms) CaseStatement pat+ sExp <- singExp exp res_ki return $ DMatch sPat sExp singLit :: Lit -> SgM DExp
src/Data/Singletons/Single/Data.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Single/Data.hs (c) Richard Eisenberg 2013-eir@cis.upenn.edu+rae@cs.brynmawr.edu Singletonizes constructors. -}@@ -14,6 +14,7 @@ import Language.Haskell.TH.Syntax import Data.Singletons.Single.Monad import Data.Singletons.Single.Type+import Data.Singletons.Single.Fixity import Data.Singletons.Promote.Type import Data.Singletons.Single.Eq import Data.Singletons.Util@@ -30,7 +31,17 @@ let tvbNames = map extractTvbName tvbs k <- promoteType (foldType (DConT name) (map DVarT tvbNames)) ctors' <- mapM (singCtor a) ctors-+ ctorFixities <-+ -- try to reify the fixity declarations for the constructors and then+ -- singletonize them. In case the reification fails, we default to an+ -- empty list of singletonized fixity declarations.+ -- why this works:+ -- 1. if we're in a call to 'genSingletons', the data type was defined+ -- earlier and its constructors are in scope, the reification succeeds.+ -- 2. if we're in a call to 'singletons', the reification will fail, but+ -- the fixity declaration will get singletonized by itself (not from+ -- here, look for other invocations of 'singInfixDecl')+ singFixityDeclarations [ n | DCon _ _ n _ _ <- ctors ] -- instance for SingKind fromSingClauses <- mapM mkFromSingClause ctors toSingClauses <- mapM mkToSingClause ctors@@ -38,7 +49,7 @@ DInstanceD Nothing (map (singKindConstraint . DVarT) tvbNames) (DAppT (DConT singKindClassName) k)- [ DTySynInstD demoteRepName $ DTySynEqn+ [ DTySynInstD demoteName $ DTySynEqn [k] (foldType (DConT name) (map (DAppT demote . DVarT) tvbNames))@@ -59,7 +70,8 @@ return $ (DDataInstD Data [] singFamilyName [DSigT a k] ctors' []) : kindedSynInst : singKindInst :- sEqInsts+ sEqInsts +++ ctorFixities where -- in the Rep case, the names of the constructors are in the wrong scope -- (they're types, not datacons), so we have to reinterpret them. mkConName :: Name -> SgM Name
src/Data/Singletons/Single/Eq.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Single/Eq.hs (c) Richard Eisenberg 2014-eir@cis.upenn.edu+rae@cs.brynmawr.edu Defines functions to generate SEq and SDecide instances. -}
+ src/Data/Singletons/Single/Fixity.hs view
@@ -0,0 +1,30 @@+module Data.Singletons.Single.Fixity where++import Prelude hiding ( exp )+import Language.Haskell.TH hiding ( cxt )+import Language.Haskell.TH.Syntax (Quasi(..))+import Data.Singletons.Util+import Data.Singletons.Names+import Language.Haskell.TH.Desugar++singInfixDecl :: Fixity -> Name -> DLetDec+singInfixDecl fixity name+ | isUpcase name =+ -- is it a tycon name or a datacon name??+ -- it *must* be a datacon name, because symbolic tycons+ -- can't be promoted. This is terrible.+ DInfixD fixity (singDataConName name)+ | otherwise = DInfixD fixity (singValName name)++singFixityDeclaration :: DsMonad q => Name -> q [DDec]+singFixityDeclaration name = do+ mFixity <- qReifyFixity name+ return $ case mFixity of+ Nothing -> []+ Just fixity -> [DLetDec $ singInfixDecl fixity name]++singFixityDeclarations :: DsMonad q => [Name] -> q [DDec]+singFixityDeclarations = concatMapM trySingFixityDeclaration+ where+ trySingFixityDeclaration name =+ qRecover (return []) (singFixityDeclaration name)
src/Data/Singletons/Single/Monad.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Single/Monad.hs (c) Richard Eisenberg 2014-eir@cis.upenn.edu+rae@cs.brynmawr.edu This file defines the SgM monad and its operations, for use during singling. @@ -11,7 +11,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving, ParallelListComp, TemplateHaskell #-} module Data.Singletons.Single.Monad (- SgM, bindLets, bindTyVars, bindTyVarsEq, lookupVarE, lookupConE,+ SgM, bindLets, lookupVarE, lookupConE, wrapSingFun, wrapUnSingFun, singM, singDecsM, emitDecs, emitDecsM@@ -20,7 +20,7 @@ import Prelude hiding ( exp ) import Data.Map ( Map ) import qualified Data.Map as Map-import Data.Singletons.Promote.Monad ( emitDecs, emitDecsM, VarPromotions )+import Data.Singletons.Promote.Monad ( emitDecs, emitDecsM ) import Data.Singletons.Names import Data.Singletons.Util import Data.Singletons@@ -72,6 +72,7 @@ qReifyConStrictness = liftSgM `comp1` qReifyConStrictness qIsExtEnabled = liftSgM `comp1` qIsExtEnabled qExtsEnabled = liftSgM qExtsEnabled+ qAddForeignFile = liftSgM `comp2` qAddForeignFile qRecover (SgM handler) (SgM body) = do env <- ask@@ -89,82 +90,6 @@ local (\env@(SgEnv { sg_let_binds = lets2 }) -> env { sg_let_binds = (Map.fromList lets1) `Map.union` lets2 }) --- bindTyVarsEq--- ~~~~~~~~~~~~~~~~------ This function does some dirty business.------ The problem is that, whenever we bind a term variable, we would also like--- to bind a type variable, for use in promotions of any nested lambdas,--- cases, and lets. The natural idea, something like `(\(foo :: Sing ty_foo)--- (bar :: Sing ty_bar) -> ...)` doesn't work, because ScopedTypeVariables is--- stupid (in RAE's opinon). The ScopedTypeVariables extension says that any--- scoped type variable is a rigid skolem. This means that the types ty_foo--- and ty_bar must be distinct! That's actually not the problem. The problem--- is that the implicit kind variables used in ty_foo's and ty_bar's kinds are--- also skolems, and this breaks the idea.------ The solution? Use scoped type variables from a function signature, where--- the bound variables' kinds are *inferred*, not skolem. This means that,--- whenever we lambda-bind variables (that is, in lambdas, let-bound--- functions, and case matches), we must then pass the variables immediately--- to a function with an explicit type signature. Thus, something like------ (\foo bar -> ...)------ becomes------ (\foo bar ->--- let lambda :: forall ty_foo ty_bar. Sing ty_foo -> Sing ty_bar -> Sing ...--- lambda foo' bar' = ... (with foo |-> foo' and bar |-> bar')--- in lambda foo bar)------ Getting the ... right in the type above is a major nuisance, and it--- explains a bunch of the types stored in the ADExp AST. (See LetDecEnv.)------ A further, unsolved problem with all of this is that the type signature--- generated never has any constraints. Thus, if the body requires a--- constraint somewhere, the code will fail to compile; we're not quite clever--- enough to get everything to line up.------ As a stop-gap measure to fix this, in the function clause case, we tie the--- scoped type variables in this "lambda" to the outer scoped type variables.--- This has the effect of making sure that the kinds of ty_foo and ty_bar--- match that of the surrounding scope and makes sure that any constraint is--- available from within the "lambda".------ This means, though, that using constraints with case statements and lambdas--- will likely not work. Ugh. UPDATE: This actually bit in practice! The--- Enum class wants to define `succ = toEnum . (+1) . fromEnum`. But that--- (+1) is a right-section, which desugars to a lambda. The Num constraint--- couldn't get through. Changing (+1) to (1+) fixed the problem, as--- left-sections don't need a lambda.--bindTyVarsEq :: VarPromotions -- the bindings we wish to effect- -> DType -- the type of the thing_inside- -> [(DType, DType)] -- and asserting these equalities- -> SgM DExp -> SgM DExp-bindTyVarsEq var_proms prom_fun equalities thing_inside = do- lambda <- qNewName "lambda"- let (term_names, tyvar_names) = unzip var_proms- eq_ct = [ mkEqPred t1 t2- | (t1, t2) <- equalities ]- ty_sig = DSigD lambda $- DForallT (map DPlainTV tyvar_names) eq_ct $- ravel (map (\tv_name -> singFamily `DAppT` DVarT tv_name)- tyvar_names)- (singFamily `DAppT` prom_fun)- arg_names <- mapM (qNewName . nameBase) term_names- body <- bindLets [ (term_name, DVarE arg_name)- | term_name <- term_names- | arg_name <- arg_names ] $ thing_inside- let fundef = DFunD lambda [DClause (map DVarPa arg_names) body]- let_body = foldExp (DVarE lambda) (map (DVarE . singValName) term_names)- return $ DLetE [ty_sig, fundef] let_body--bindTyVars :: VarPromotions -> DType -> SgM DExp -> SgM DExp-bindTyVars var_proms prom_fun = bindTyVarsEq var_proms prom_fun []- lookupVarE :: Name -> SgM DExp lookupVarE = lookup_var_con singValName (DVarE . singValName) @@ -200,7 +125,7 @@ 7 -> 'singFun7 _ -> error "No support for functions of arity > 7." in- (wrap_fun `DAppE` proxyFor ty `DAppE`)+ (wrap_fun `DAppTypeE` ty `DAppE`) wrapUnSingFun :: Int -> DType -> DExp -> DExp wrapUnSingFun 0 _ = id@@ -215,7 +140,7 @@ 7 -> 'unSingFun7 _ -> error "No support for functions of arity > 7." in- (unwrap_fun `DAppE` proxyFor ty `DAppE`)+ (unwrap_fun `DAppTypeE` ty `DAppE`) singM :: DsMonad q => [Dec] -> SgM a -> q (a, [DDec]) singM locals (SgM rdr) = do
src/Data/Singletons/Single/Type.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Single/Type.hs (c) Richard Eisenberg 2013-eir@cis.upenn.edu+rae@cs.brynmawr.edu Singletonizes types. -}
src/Data/Singletons/SuppressUnusedWarnings.hs view
@@ -1,7 +1,7 @@ -- Data/Singletons/Hidden.hs -- -- (c) Richard Eisenberg 2014--- eir@cis.upenn.edu+-- rae@cs.brynmawr.edu -- -- This declares user-oriented exports that are actually meant to be hidden -- from the user. Why would anyone ever want this? Because what is below
src/Data/Singletons/Syntax.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Syntax.hs (c) Richard Eisenberg 2014-eir@cis.upenn.edu+rae@cs.brynmawr.edu Converts a list of DLetDecs into a LetDecEnv for easier processing, and contains various other AST definitions.@@ -54,18 +54,15 @@ | ADConE Name | ADLitE Lit | ADAppE ADExp ADExp- | ADLamE VarPromotions -- bind these type variables to these term vars+ | ADLamE [Name] -- type-level names corresponding to term-level ones DType -- the promoted lambda [Name] ADExp- | ADCaseE ADExp DType [ADMatch] DType- -- the first type is the promoted scrutinee;- -- the second type is the return type+ | ADCaseE ADExp [ADMatch] DType+ -- the type is the return type | ADLetE ALetDecEnv ADExp | ADSigE ADExp DType - -- unlike in other places, the DType in an ADMatch (the promoted "case" statement)- -- should be used with DAppT, *not* apply! (Case statements are not defunctionalized.)-data ADMatch = ADMatch VarPromotions DType DPat ADExp+data ADMatch = ADMatch VarPromotions DPat ADExp data ADClause = ADClause VarPromotions [DPat] ADExp @@ -134,3 +131,4 @@ go (typeBinding name ty <> acc) rest go acc (DInfixD f n : rest) = go (infixDecl f n <> acc) rest+ go acc (DPragmaD{} : rest) = go acc rest
src/Data/Singletons/TH.hs view
@@ -5,7 +5,7 @@ -- Module : Data.Singletons.TH -- Copyright : (C) 2013 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --@@ -54,7 +54,7 @@ POrd(..), SOrd(..), ThenCmp, sThenCmp, Foldl, sFoldl, Any, SDecide(..), (:~:)(..), Void, Refuted, Decision(..),- Proxy(..), SomeSing(..),+ SomeSing(..), Error, ErrorSym0, TrueSym0, FalseSym0,@@ -88,7 +88,6 @@ import GHC.Exts import Language.Haskell.TH import Data.Singletons.Util-import Data.Proxy ( Proxy(..) ) import Control.Arrow ( first ) -- | The function 'cases' generates a case expression where each right-hand side
src/Data/Singletons/TypeLits.hs view
@@ -1,15 +1,16 @@+{-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeInType, ConstraintKinds,+ GADTs, TypeFamilies #-}+ ----------------------------------------------------------------------------- -- | -- Module : Data.Singletons.TypeLits -- Copyright : (C) 2014 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable -- -- Defines and exports singletons useful for the Nat and Symbol kinds.--- This exports the internal, unsafe constructors. Use Data.Singletons.TypeLits--- for a safe interface. -- ---------------------------------------------------------------------------- @@ -20,7 +21,8 @@ Sing(SNat, SSym), SNat, SSymbol, withKnownNat, withKnownSymbol, Error, ErrorSym0, ErrorSym1, sError,- KnownNat, natVal, KnownSymbol, symbolVal,+ KnownNat, KnownNatSym0, KnownNatSym1, natVal,+ KnownSymbol, KnownSymbolSym0, KnownSymbolSym1, symbolVal, (:^), (:^$), (:^$$), (:^$$$) ) where@@ -28,7 +30,9 @@ import Data.Singletons.TypeLits.Internal import Data.Singletons.Prelude.Num () -- for typelits instances --- This bogus Num instance is helpful for people who want to define+import Data.Singletons.Promote++-- | This bogus 'Num' instance is helpful for people who want to define -- functions over Nats that will only be used at the type level or -- as singletons. A correct SNum instance for Nat singletons exists. instance Num Nat where@@ -40,5 +44,27 @@ signum = no_term_level_nats fromInteger = no_term_level_nats +instance Eq Nat where+ (==) = no_term_level_nats++instance Ord Nat where+ compare = no_term_level_nats++-- | This bogus instance is helpful for people who want to define+-- functions over Symbols that will only be used at the type level or+-- as singletons.+instance Eq Symbol where+ (==) = no_term_level_syms++instance Ord Symbol where+ compare = no_term_level_syms++ no_term_level_nats :: a no_term_level_nats = error "The kind `Nat` may not be used at the term level."++no_term_level_syms :: a+no_term_level_syms = error "The kind `Symbol` may not be used at the term level."++-- These are often useful in TypeLits-heavy code+$(genDefunSymbols [''KnownNat, ''KnownSymbol])
src/Data/Singletons/TypeLits/Internal.hs view
@@ -3,7 +3,7 @@ -- Module : Data.Singletons.TypeLits.Internal -- Copyright : (C) 2014 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --@@ -16,7 +16,7 @@ {-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, FlexibleInstances, UndecidableInstances, ScopedTypeVariables, RankNTypes, GADTs, FlexibleContexts, TypeOperators, ConstraintKinds,- TypeInType, TemplateHaskell #-}+ TypeInType, TemplateHaskell, StandaloneDeriving #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Data.Singletons.TypeLits.Internal (@@ -41,6 +41,9 @@ import Data.Proxy ( Proxy(..) ) import Unsafe.Coerce +import qualified Data.Text as T+import Data.Text ( Text )+ ---------------------------------------------------------------------- ---- TypeLits singletons --------------------------------------------- ----------------------------------------------------------------------@@ -51,7 +54,7 @@ sing = SNat instance SingKind Nat where- type DemoteRep Nat = Integer+ type Demote Nat = Integer fromSing (SNat :: Sing n) = natVal (Proxy :: Proxy n) toSing n = case someNatVal n of Just (SomeNat (_ :: Proxy n)) -> SomeSing (SNat :: Sing n)@@ -63,9 +66,9 @@ sing = SSym instance SingKind Symbol where- type DemoteRep Symbol = String- fromSing (SSym :: Sing n) = symbolVal (Proxy :: Proxy n)- toSing s = case someSymbolVal s of+ type Demote Symbol = Text+ fromSing (SSym :: Sing n) = T.pack (symbolVal (Proxy :: Proxy n))+ toSing s = case someSymbolVal (T.unpack s) of SomeSymbol (_ :: Proxy n) -> SomeSing (SSym :: Sing n) -- SDecide instances:@@ -86,9 +89,9 @@ where errStr = "Broken Symbol singletons" -- PEq instances-instance PEq ('Proxy :: Proxy Nat) where+instance PEq Nat where type (a :: Nat) :== (b :: Nat) = a == b-instance PEq ('Proxy :: Proxy Symbol) where+instance PEq Symbol where type (a :: Symbol) :== (b :: Symbol) = a == b -- need SEq instances for TypeLits kinds@@ -103,10 +106,10 @@ | otherwise = unsafeCoerce SFalse -- POrd instances-instance POrd ('Proxy :: Proxy Nat) where+instance POrd Nat where type (a :: Nat) `Compare` (b :: Nat) = a `TL.CmpNat` b -instance POrd ('Proxy :: Proxy Symbol) where+instance POrd Symbol where type (a :: Symbol) `Compare` (b :: Symbol) = a `TL.CmpSymbol` b -- | Kind-restricted synonym for 'Sing' for @Nat@s@@ -147,9 +150,34 @@ -- | The singleton for 'error' sError :: Sing (str :: Symbol) -> a-sError sstr = error (fromSing sstr)+sError sstr = error (T.unpack (fromSing sstr)) -- TODO: move this to a better home: type a :^ b = a ^ b infixr 8 :^ $(genDefunSymbols [''(:^)])++------------------------------------------------------------+-- TypeLits singleton non-singleton instances+------------------------------------------------------------++-- Thanks to @cumber on #179++instance Show (SNat n) where+ showsPrec p n@SNat+ = showParen (p > atPrec)+ ( showString "SNat @"+ . showsPrec (atPrec + 1) (natVal n)+ )+ where atPrec = 10++instance Show (SSymbol s) where+ showsPrec p s@SSym+ = showParen (p > atPrec)+ ( showString "SSym @"+ . showsPrec (atPrec + 1) (symbolVal s)+ )+ where atPrec = 10++deriving instance Show (SomeSing Nat)+deriving instance Show (SomeSing Symbol)
src/Data/Singletons/TypeRepStar.hs view
@@ -8,7 +8,7 @@ -- Module : Data.Singletons.TypeRepStar -- Copyright : (C) 2013 Richard Eisenberg -- License : BSD-style (see LICENSE)--- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)+-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : experimental -- Portability : non-portable --@@ -47,11 +47,11 @@ instance Typeable a => SingI (a :: *) where sing = STypeRep instance SingKind Type where- type DemoteRep Type = TypeRep+ type Demote Type = TypeRep fromSing (STypeRep :: Sing a) = typeOf (undefined :: a) toSing = dirty_mk_STypeRep -instance PEq ('Proxy :: Proxy Type) where+instance PEq Type where type (a :: *) :== (b :: *) = a == b instance SEq Type where
src/Data/Singletons/Util.hs view
@@ -1,7 +1,7 @@ {- Data/Singletons/Util.hs (c) Richard Eisenberg 2013-eir@cis.upenn.edu+rae@cs.brynmawr.edu This file contains helper functions internal to the singletons package. Users of the package should not need to consult this file.@@ -124,6 +124,14 @@ | otherwise = symb ++ ':' : str +-- Ensures that the name is a suitable name for a data constructor+toDataConName :: Name -> Name+toDataConName n+ | isUpcase n = n+ | str@('$' : _) <- nameBase n = mkName (':' : str)+ | otherwise = upcase n++ noPrefix :: (String, String) noPrefix = ("", "") @@ -369,6 +377,7 @@ qReifyConStrictness = lift `comp1` qReifyConStrictness qIsExtEnabled = lift `comp1` qIsExtEnabled qExtsEnabled = lift qExtsEnabled+ qAddForeignFile = lift `comp2` qAddForeignFile qRecover exp handler = do (result, aux) <- lift $ qRecover (evalForPair exp) (evalForPair handler)@@ -452,6 +461,11 @@ partitionLetDecs :: [DDec] -> ([DLetDec], [DDec]) partitionLetDecs = partitionWith (\case DLetDec ld -> Left ld dec -> Right dec)++{-# INLINEABLE zipWith3M #-}+zipWith3M :: Monad m => (a -> b -> m c) -> [a] -> [b] -> m [c]+zipWith3M f (a:as) (b:bs) = (:) <$> f a b <*> zipWith3M f as bs+zipWith3M _ _ _ = return [] mapAndUnzip3M :: Monad m => (a -> m (b,c,d)) -> [a] -> m ([b],[c],[d]) mapAndUnzip3M _ [] = return ([],[],[])
tests/SingletonsTestSuite.hs view
@@ -56,6 +56,18 @@ , compileAndDumpStdTest "T124" , compileAndDumpStdTest "T136" , compileAndDumpStdTest "T136b"+ , compileAndDumpStdTest "T153"+ , compileAndDumpStdTest "T157"+ , compileAndDumpStdTest "T159"+ , compileAndDumpStdTest "T167"+ , compileAndDumpStdTest "T145"+ , compileAndDumpStdTest "PolyKinds"+ , compileAndDumpStdTest "PolyKindsApp"+ , compileAndDumpStdTest "T166"+ , compileAndDumpStdTest "T172"+ , compileAndDumpStdTest "T175"+ , compileAndDumpStdTest "T176"+ , compileAndDumpStdTest "T178" ], testCompileAndDumpGroup "Promote" [ compileAndDumpStdTest "Constructors"@@ -63,6 +75,7 @@ , compileAndDumpStdTest "Newtypes" , compileAndDumpStdTest "Pragmas" , compileAndDumpStdTest "Prelude"+ , compileAndDumpStdTest "T180" ], testGroup "Database client" [ compileAndDumpTest "GradingClient/Database" ghcOpts
tests/SingletonsTestSuiteUtils.hs view
@@ -23,7 +23,7 @@ import Distribution.Package ( PackageIdentifier(..) ) import Distribution.Text ( simpleParse )-import Data.Version ( Version(..) )+import Distribution.Version ( mkVersion ) import System.IO.Unsafe ( unsafePerformIO ) #ifndef CURRENT_PACKAGE_KEY@@ -51,7 +51,7 @@ includePath = "../../dist/build" ghcVersion :: String-ghcVersion = ".ghc80"+ghcVersion = ".ghc82" -- The mtl package made an incompatible change between 2.1.3.1 and 2.2.1. Because -- test files are compiled outside of the cabal infrastructure, we need to check@@ -77,7 +77,7 @@ else return ([], []) mtl_string <- readProcess "ghc-pkg" (ghcPkgOpts ++ ["latest", "mtl"]) "" let Just (PackageIdentifier { pkgVersion = ver }) = simpleParse mtl_string- firstModernVersion = Version [2,2,1] []+ firstModernVersion = mkVersion [2,2,1] mtlOpt | ver >= firstModernVersion = ["-DMODERN_MTL"] | otherwise = [] return $ ghcPackageDbOpts ++ mtlOpt@@ -228,7 +228,9 @@ , "-e", "'s/:[0-9][0-9]*:[0-9][0-9]*/:0:0/g'" , "-e", "'s/:[0-9]*:[0-9]*-[0-9]*/:0:0:/g'" , "-e", "'s/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/0123456789/g'"+ , "-e", "'s/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/0123456789876543210/g'" , "-e", "'s/[!#$%&*+./>]\\{10\\}/%%%%%%%%%%/g'"+ , "-e", "'s/[!#$%&*+./>]\\{19\\}/%%%%%%%%%%%%%%%%%%%/g'" , file ]
− tests/compile-and-dump/GradingClient/Database.ghc80.template
@@ -1,4907 +0,0 @@-GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| data Nat- = Zero | Succ Nat- deriving (Eq, Ord) |]- ======>- data Nat- = Zero | Succ Nat- deriving (Eq, Ord)- type family Equals_0123456789 (a :: Nat) (b :: Nat) :: Bool where- Equals_0123456789 Zero Zero = TrueSym0- Equals_0123456789 (Succ a) (Succ b) = (:==) a b- Equals_0123456789 (a :: Nat) (b :: Nat) = FalseSym0- instance PEq (Proxy :: Proxy Nat) where- type (:==) (a :: Nat) (b :: Nat) = Equals_0123456789 a b- type ZeroSym0 = Zero- type SuccSym1 (t :: Nat) = Succ t- instance SuppressUnusedWarnings SuccSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) SuccSym0KindInference GHC.Tuple.())- data SuccSym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply SuccSym0 arg) ~ KindOf (SuccSym1 arg) =>- SuccSym0KindInference- type instance Apply SuccSym0 l = SuccSym1 l- type family Compare_0123456789 (a :: Nat)- (a :: Nat) :: Ordering where- Compare_0123456789 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]- Compare_0123456789 (Succ a_0123456789) (Succ b_0123456789) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) '[])- Compare_0123456789 Zero (Succ _z_0123456789) = LTSym0- Compare_0123456789 (Succ _z_0123456789) Zero = GTSym0- type Compare_0123456789Sym2 (t :: Nat) (t :: Nat) =- Compare_0123456789 t t- instance SuppressUnusedWarnings Compare_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Compare_0123456789Sym1KindInference GHC.Tuple.())- data Compare_0123456789Sym1 (l :: Nat) (l :: TyFun Nat Ordering)- = forall arg. KindOf (Apply (Compare_0123456789Sym1 l) arg) ~ KindOf (Compare_0123456789Sym2 l arg) =>- Compare_0123456789Sym1KindInference- type instance Apply (Compare_0123456789Sym1 l) l = Compare_0123456789Sym2 l l- instance SuppressUnusedWarnings Compare_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Compare_0123456789Sym0KindInference GHC.Tuple.())- data Compare_0123456789Sym0 (l :: TyFun Nat (TyFun Nat Ordering- -> Type))- = forall arg. KindOf (Apply Compare_0123456789Sym0 arg) ~ KindOf (Compare_0123456789Sym1 arg) =>- Compare_0123456789Sym0KindInference- type instance Apply Compare_0123456789Sym0 l = Compare_0123456789Sym1 l- instance POrd (Proxy :: Proxy Nat) where- type Compare (a :: Nat) (a :: Nat) = Apply (Apply Compare_0123456789Sym0 a) a- data instance Sing (z :: Nat)- = z ~ Zero => SZero |- forall (n :: Nat). z ~ Succ n => SSucc (Sing (n :: Nat))- type SNat = (Sing :: Nat -> Type)- instance SingKind Nat where- type DemoteRep Nat = Nat- fromSing SZero = Zero- fromSing (SSucc b) = Succ (fromSing b)- toSing Zero = SomeSing SZero- toSing (Succ b)- = case toSing b :: SomeSing Nat of {- SomeSing c -> SomeSing (SSucc c) }- instance SEq Nat where- (%:==) SZero SZero = STrue- (%:==) SZero (SSucc _) = SFalse- (%:==) (SSucc _) SZero = SFalse- (%:==) (SSucc a) (SSucc b) = (%:==) a b- instance SDecide Nat where- (%~) SZero SZero = Proved Refl- (%~) SZero (SSucc _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SSucc _) SZero- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SSucc a) (SSucc b)- = case (%~) a b of {- Proved Refl -> Proved Refl- Disproved contra- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- instance SOrd Nat => SOrd Nat where- sCompare ::- forall (t0 :: Nat) (t1 :: Nat).- Sing t0- -> Sing t1- -> Sing (Apply (Apply (CompareSym0 :: TyFun Nat (TyFun Nat Ordering- -> Type)- -> Type) t0 :: TyFun Nat Ordering- -> Type) t1 :: Ordering)- sCompare SZero SZero- = let- lambda ::- (t0 ~ ZeroSym0, t1 ~ ZeroSym0) =>- Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- SNil- in lambda- sCompare (SSucc sA_0123456789) (SSucc sB_0123456789)- = let- lambda ::- forall a_0123456789 b_0123456789.- (t0 ~ Apply SuccSym0 a_0123456789,- t1 ~ Apply SuccSym0 b_0123456789) =>- Sing a_0123456789- -> Sing b_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda a_0123456789 b_0123456789- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- SNil)- in lambda sA_0123456789 sB_0123456789- sCompare SZero (SSucc _s_z_0123456789)- = let- lambda ::- forall _z_0123456789.- (t0 ~ ZeroSym0, t1 ~ Apply SuccSym0 _z_0123456789) =>- Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SLT- in lambda _s_z_0123456789- sCompare (SSucc _s_z_0123456789) SZero- = let- lambda ::- forall _z_0123456789.- (t0 ~ Apply SuccSym0 _z_0123456789, t1 ~ ZeroSym0) =>- Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SGT- in lambda _s_z_0123456789- instance SingI Zero where- sing = SZero- instance SingI n => SingI (Succ (n :: Nat)) where- sing = SSucc sing-GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| append :: Schema -> Schema -> Schema- append (Sch s1) (Sch s2) = Sch (s1 ++ s2)- attrNotIn :: Attribute -> Schema -> Bool- attrNotIn _ (Sch []) = True- attrNotIn (Attr name u) (Sch ((Attr name' _) : t))- = (name /= name') && (attrNotIn (Attr name u) (Sch t))- disjoint :: Schema -> Schema -> Bool- disjoint (Sch []) _ = True- disjoint (Sch (h : t)) s = (attrNotIn h s) && (disjoint (Sch t) s)- occurs :: [AChar] -> Schema -> Bool- occurs _ (Sch []) = False- occurs name (Sch ((Attr name' _) : attrs))- = name == name' || occurs name (Sch attrs)- lookup :: [AChar] -> Schema -> U- lookup _ (Sch []) = undefined- lookup name (Sch ((Attr name' u) : attrs))- = if name == name' then u else lookup name (Sch attrs)- - data U- = BOOL | STRING | NAT | VEC U Nat- deriving (Read, Eq, Show)- data AChar- = CA |- CB |- CC |- CD |- CE |- CF |- CG |- CH |- CI |- CJ |- CK |- CL |- CM |- CN |- CO |- CP |- CQ |- CR |- CS |- CT |- CU |- CV |- CW |- CX |- CY |- CZ- deriving (Read, Show, Eq)- data Attribute = Attr [AChar] U- data Schema = Sch [Attribute] |]- ======>- data U- = BOOL | STRING | NAT | VEC U Nat- deriving (Read, Eq, Show)- data AChar- = CA |- CB |- CC |- CD |- CE |- CF |- CG |- CH |- CI |- CJ |- CK |- CL |- CM |- CN |- CO |- CP |- CQ |- CR |- CS |- CT |- CU |- CV |- CW |- CX |- CY |- CZ- deriving (Read, Show, Eq)- data Attribute = Attr [AChar] U- data Schema = Sch [Attribute]- append :: Schema -> Schema -> Schema- append (Sch s1) (Sch s2) = Sch (s1 ++ s2)- attrNotIn :: Attribute -> Schema -> Bool- attrNotIn _ (Sch GHC.Types.[]) = True- attrNotIn (Attr name u) (Sch ((Attr name' _) GHC.Types.: t))- = ((name /= name') && (attrNotIn (Attr name u) (Sch t)))- disjoint :: Schema -> Schema -> Bool- disjoint (Sch GHC.Types.[]) _ = True- disjoint (Sch (h GHC.Types.: t)) s- = ((attrNotIn h s) && (disjoint (Sch t) s))- occurs :: [AChar] -> Schema -> Bool- occurs _ (Sch GHC.Types.[]) = False- occurs name (Sch ((Attr name' _) GHC.Types.: attrs))- = ((name == name') || (occurs name (Sch attrs)))- lookup :: [AChar] -> Schema -> U- lookup _ (Sch GHC.Types.[]) = undefined- lookup name (Sch ((Attr name' u) GHC.Types.: attrs))- = if (name == name') then u else lookup name (Sch attrs)- type family Equals_0123456789 (a :: U) (b :: U) :: Bool where- Equals_0123456789 BOOL BOOL = TrueSym0- Equals_0123456789 STRING STRING = TrueSym0- Equals_0123456789 NAT NAT = TrueSym0- Equals_0123456789 (VEC a a) (VEC b b) = (:&&) ((:==) a b) ((:==) a b)- Equals_0123456789 (a :: U) (b :: U) = FalseSym0- instance PEq (Proxy :: Proxy U) where- type (:==) (a :: U) (b :: U) = Equals_0123456789 a b- type BOOLSym0 = BOOL- type STRINGSym0 = STRING- type NATSym0 = NAT- type VECSym2 (t :: U) (t :: Nat) = VEC t t- instance SuppressUnusedWarnings VECSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) VECSym1KindInference GHC.Tuple.())- data VECSym1 (l :: U) (l :: TyFun Nat U)- = forall arg. KindOf (Apply (VECSym1 l) arg) ~ KindOf (VECSym2 l arg) =>- VECSym1KindInference- type instance Apply (VECSym1 l) l = VECSym2 l l- instance SuppressUnusedWarnings VECSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) VECSym0KindInference GHC.Tuple.())- data VECSym0 (l :: TyFun U (TyFun Nat U -> Type))- = forall arg. KindOf (Apply VECSym0 arg) ~ KindOf (VECSym1 arg) =>- VECSym0KindInference- type instance Apply VECSym0 l = VECSym1 l- type family Equals_0123456789 (a :: AChar)- (b :: AChar) :: Bool where- Equals_0123456789 CA CA = TrueSym0- Equals_0123456789 CB CB = TrueSym0- Equals_0123456789 CC CC = TrueSym0- Equals_0123456789 CD CD = TrueSym0- Equals_0123456789 CE CE = TrueSym0- Equals_0123456789 CF CF = TrueSym0- Equals_0123456789 CG CG = TrueSym0- Equals_0123456789 CH CH = TrueSym0- Equals_0123456789 CI CI = TrueSym0- Equals_0123456789 CJ CJ = TrueSym0- Equals_0123456789 CK CK = TrueSym0- Equals_0123456789 CL CL = TrueSym0- Equals_0123456789 CM CM = TrueSym0- Equals_0123456789 CN CN = TrueSym0- Equals_0123456789 CO CO = TrueSym0- Equals_0123456789 CP CP = TrueSym0- Equals_0123456789 CQ CQ = TrueSym0- Equals_0123456789 CR CR = TrueSym0- Equals_0123456789 CS CS = TrueSym0- Equals_0123456789 CT CT = TrueSym0- Equals_0123456789 CU CU = TrueSym0- Equals_0123456789 CV CV = TrueSym0- Equals_0123456789 CW CW = TrueSym0- Equals_0123456789 CX CX = TrueSym0- Equals_0123456789 CY CY = TrueSym0- Equals_0123456789 CZ CZ = TrueSym0- Equals_0123456789 (a :: AChar) (b :: AChar) = FalseSym0- instance PEq (Proxy :: Proxy AChar) where- type (:==) (a :: AChar) (b :: AChar) = Equals_0123456789 a b- type CASym0 = CA- type CBSym0 = CB- type CCSym0 = CC- type CDSym0 = CD- type CESym0 = CE- type CFSym0 = CF- type CGSym0 = CG- type CHSym0 = CH- type CISym0 = CI- type CJSym0 = CJ- type CKSym0 = CK- type CLSym0 = CL- type CMSym0 = CM- type CNSym0 = CN- type COSym0 = CO- type CPSym0 = CP- type CQSym0 = CQ- type CRSym0 = CR- type CSSym0 = CS- type CTSym0 = CT- type CUSym0 = CU- type CVSym0 = CV- type CWSym0 = CW- type CXSym0 = CX- type CYSym0 = CY- type CZSym0 = CZ- type AttrSym2 (t :: [AChar]) (t :: U) = Attr t t- instance SuppressUnusedWarnings AttrSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) AttrSym1KindInference GHC.Tuple.())- data AttrSym1 (l :: [AChar]) (l :: TyFun U Attribute)- = forall arg. KindOf (Apply (AttrSym1 l) arg) ~ KindOf (AttrSym2 l arg) =>- AttrSym1KindInference- type instance Apply (AttrSym1 l) l = AttrSym2 l l- instance SuppressUnusedWarnings AttrSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) AttrSym0KindInference GHC.Tuple.())- data AttrSym0 (l :: TyFun [AChar] (TyFun U Attribute -> Type))- = forall arg. KindOf (Apply AttrSym0 arg) ~ KindOf (AttrSym1 arg) =>- AttrSym0KindInference- type instance Apply AttrSym0 l = AttrSym1 l- type SchSym1 (t :: [Attribute]) = Sch t- instance SuppressUnusedWarnings SchSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) SchSym0KindInference GHC.Tuple.())- data SchSym0 (l :: TyFun [Attribute] Schema)- = forall arg. KindOf (Apply SchSym0 arg) ~ KindOf (SchSym1 arg) =>- SchSym0KindInference- type instance Apply SchSym0 l = SchSym1 l- type Let0123456789Scrutinee_0123456789Sym4 t t t t =- Let0123456789Scrutinee_0123456789 t t t t- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym3 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym3KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym3 l l l l- = forall arg. KindOf (Apply (Let0123456789Scrutinee_0123456789Sym3 l l l) arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym4 l l l arg) =>- Let0123456789Scrutinee_0123456789Sym3KindInference- type instance Apply (Let0123456789Scrutinee_0123456789Sym3 l l l) l = Let0123456789Scrutinee_0123456789Sym4 l l l l- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym2KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Let0123456789Scrutinee_0123456789Sym2 l l) arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym3 l l arg) =>- Let0123456789Scrutinee_0123456789Sym2KindInference- type instance Apply (Let0123456789Scrutinee_0123456789Sym2 l l) l = Let0123456789Scrutinee_0123456789Sym3 l l l- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym1KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym1 l l- = forall arg. KindOf (Apply (Let0123456789Scrutinee_0123456789Sym1 l) arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym2 l arg) =>- Let0123456789Scrutinee_0123456789Sym1KindInference- type instance Apply (Let0123456789Scrutinee_0123456789Sym1 l) l = Let0123456789Scrutinee_0123456789Sym2 l l- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym0KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym0 l- = forall arg. KindOf (Apply Let0123456789Scrutinee_0123456789Sym0 arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym1 arg) =>- Let0123456789Scrutinee_0123456789Sym0KindInference- type instance Apply Let0123456789Scrutinee_0123456789Sym0 l = Let0123456789Scrutinee_0123456789Sym1 l- type family Let0123456789Scrutinee_0123456789 name- name'- u- attrs where- Let0123456789Scrutinee_0123456789 name name' u attrs = Apply (Apply (:==$) name) name'- type family Case_0123456789 name name' u attrs t where- Case_0123456789 name name' u attrs True = u- Case_0123456789 name name' u attrs False = Apply (Apply LookupSym0 name) (Apply SchSym0 attrs)- type LookupSym2 (t :: [AChar]) (t :: Schema) = Lookup t t- instance SuppressUnusedWarnings LookupSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) LookupSym1KindInference GHC.Tuple.())- data LookupSym1 (l :: [AChar]) (l :: TyFun Schema U)- = forall arg. KindOf (Apply (LookupSym1 l) arg) ~ KindOf (LookupSym2 l arg) =>- LookupSym1KindInference- type instance Apply (LookupSym1 l) l = LookupSym2 l l- instance SuppressUnusedWarnings LookupSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) LookupSym0KindInference GHC.Tuple.())- data LookupSym0 (l :: TyFun [AChar] (TyFun Schema U -> Type))- = forall arg. KindOf (Apply LookupSym0 arg) ~ KindOf (LookupSym1 arg) =>- LookupSym0KindInference- type instance Apply LookupSym0 l = LookupSym1 l- type OccursSym2 (t :: [AChar]) (t :: Schema) = Occurs t t- instance SuppressUnusedWarnings OccursSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) OccursSym1KindInference GHC.Tuple.())- data OccursSym1 (l :: [AChar]) (l :: TyFun Schema Bool)- = forall arg. KindOf (Apply (OccursSym1 l) arg) ~ KindOf (OccursSym2 l arg) =>- OccursSym1KindInference- type instance Apply (OccursSym1 l) l = OccursSym2 l l- instance SuppressUnusedWarnings OccursSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) OccursSym0KindInference GHC.Tuple.())- data OccursSym0 (l :: TyFun [AChar] (TyFun Schema Bool -> Type))- = forall arg. KindOf (Apply OccursSym0 arg) ~ KindOf (OccursSym1 arg) =>- OccursSym0KindInference- type instance Apply OccursSym0 l = OccursSym1 l- type AttrNotInSym2 (t :: Attribute) (t :: Schema) = AttrNotIn t t- instance SuppressUnusedWarnings AttrNotInSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) AttrNotInSym1KindInference GHC.Tuple.())- data AttrNotInSym1 (l :: Attribute) (l :: TyFun Schema Bool)- = forall arg. KindOf (Apply (AttrNotInSym1 l) arg) ~ KindOf (AttrNotInSym2 l arg) =>- AttrNotInSym1KindInference- type instance Apply (AttrNotInSym1 l) l = AttrNotInSym2 l l- instance SuppressUnusedWarnings AttrNotInSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) AttrNotInSym0KindInference GHC.Tuple.())- data AttrNotInSym0 (l :: TyFun Attribute (TyFun Schema Bool- -> Type))- = forall arg. KindOf (Apply AttrNotInSym0 arg) ~ KindOf (AttrNotInSym1 arg) =>- AttrNotInSym0KindInference- type instance Apply AttrNotInSym0 l = AttrNotInSym1 l- type DisjointSym2 (t :: Schema) (t :: Schema) = Disjoint t t- instance SuppressUnusedWarnings DisjointSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) DisjointSym1KindInference GHC.Tuple.())- data DisjointSym1 (l :: Schema) (l :: TyFun Schema Bool)- = forall arg. KindOf (Apply (DisjointSym1 l) arg) ~ KindOf (DisjointSym2 l arg) =>- DisjointSym1KindInference- type instance Apply (DisjointSym1 l) l = DisjointSym2 l l- instance SuppressUnusedWarnings DisjointSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) DisjointSym0KindInference GHC.Tuple.())- data DisjointSym0 (l :: TyFun Schema (TyFun Schema Bool -> Type))- = forall arg. KindOf (Apply DisjointSym0 arg) ~ KindOf (DisjointSym1 arg) =>- DisjointSym0KindInference- type instance Apply DisjointSym0 l = DisjointSym1 l- type AppendSym2 (t :: Schema) (t :: Schema) = Append t t- instance SuppressUnusedWarnings AppendSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) AppendSym1KindInference GHC.Tuple.())- data AppendSym1 (l :: Schema) (l :: TyFun Schema Schema)- = forall arg. KindOf (Apply (AppendSym1 l) arg) ~ KindOf (AppendSym2 l arg) =>- AppendSym1KindInference- type instance Apply (AppendSym1 l) l = AppendSym2 l l- instance SuppressUnusedWarnings AppendSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) AppendSym0KindInference GHC.Tuple.())- data AppendSym0 (l :: TyFun Schema (TyFun Schema Schema -> Type))- = forall arg. KindOf (Apply AppendSym0 arg) ~ KindOf (AppendSym1 arg) =>- AppendSym0KindInference- type instance Apply AppendSym0 l = AppendSym1 l- type family Lookup (a :: [AChar]) (a :: Schema) :: U where- Lookup _z_0123456789 (Sch '[]) = Any- Lookup name (Sch ((:) (Attr name' u) attrs)) = Case_0123456789 name name' u attrs (Let0123456789Scrutinee_0123456789Sym4 name name' u attrs)- type family Occurs (a :: [AChar]) (a :: Schema) :: Bool where- Occurs _z_0123456789 (Sch '[]) = FalseSym0- Occurs name (Sch ((:) (Attr name' _z_0123456789) attrs)) = Apply (Apply (:||$) (Apply (Apply (:==$) name) name')) (Apply (Apply OccursSym0 name) (Apply SchSym0 attrs))- type family AttrNotIn (a :: Attribute) (a :: Schema) :: Bool where- AttrNotIn _z_0123456789 (Sch '[]) = TrueSym0- AttrNotIn (Attr name u) (Sch ((:) (Attr name' _z_0123456789) t)) = Apply (Apply (:&&$) (Apply (Apply (:/=$) name) name')) (Apply (Apply AttrNotInSym0 (Apply (Apply AttrSym0 name) u)) (Apply SchSym0 t))- type family Disjoint (a :: Schema) (a :: Schema) :: Bool where- Disjoint (Sch '[]) _z_0123456789 = TrueSym0- Disjoint (Sch ((:) h t)) s = Apply (Apply (:&&$) (Apply (Apply AttrNotInSym0 h) s)) (Apply (Apply DisjointSym0 (Apply SchSym0 t)) s)- type family Append (a :: Schema) (a :: Schema) :: Schema where- Append (Sch s1) (Sch s2) = Apply SchSym0 (Apply (Apply (:++$) s1) s2)- sLookup ::- forall (t :: [AChar]) (t :: Schema).- Sing t -> Sing t -> Sing (Apply (Apply LookupSym0 t) t :: U)- sOccurs ::- forall (t :: [AChar]) (t :: Schema).- Sing t -> Sing t -> Sing (Apply (Apply OccursSym0 t) t :: Bool)- sAttrNotIn ::- forall (t :: Attribute) (t :: Schema).- Sing t -> Sing t -> Sing (Apply (Apply AttrNotInSym0 t) t :: Bool)- sDisjoint ::- forall (t :: Schema) (t :: Schema).- Sing t -> Sing t -> Sing (Apply (Apply DisjointSym0 t) t :: Bool)- sAppend ::- forall (t :: Schema) (t :: Schema).- Sing t -> Sing t -> Sing (Apply (Apply AppendSym0 t) t :: Schema)- sLookup _s_z_0123456789 (SSch SNil)- = let- lambda ::- forall _z_0123456789.- (t ~ _z_0123456789, t ~ Apply SchSym0 '[]) =>- Sing _z_0123456789 -> Sing (Apply (Apply LookupSym0 t) t :: U)- lambda _z_0123456789 = undefined- in lambda _s_z_0123456789- sLookup sName (SSch (SCons (SAttr sName' sU) sAttrs))- = let- lambda ::- forall name name' u attrs.- (t ~ name,- t ~ Apply SchSym0 (Apply (Apply (:$) (Apply (Apply AttrSym0 name') u)) attrs)) =>- Sing name- -> Sing name'- -> Sing u -> Sing attrs -> Sing (Apply (Apply LookupSym0 t) t :: U)- lambda name name' u attrs- = let- sScrutinee_0123456789 ::- Sing (Let0123456789Scrutinee_0123456789Sym4 name name' u attrs)- sScrutinee_0123456789- = applySing- (applySing (singFun2 (Proxy :: Proxy (:==$)) (%:==)) name) name'- in case sScrutinee_0123456789 of {- STrue- -> let- lambda ::- TrueSym0 ~ Let0123456789Scrutinee_0123456789Sym4 name name' u attrs =>- Sing (Case_0123456789 name name' u attrs TrueSym0 :: U)- lambda = u- in lambda- SFalse- -> let- lambda ::- FalseSym0 ~ Let0123456789Scrutinee_0123456789Sym4 name name' u attrs =>- Sing (Case_0123456789 name name' u attrs FalseSym0 :: U)- lambda- = applySing- (applySing (singFun2 (Proxy :: Proxy LookupSym0) sLookup) name)- (applySing (singFun1 (Proxy :: Proxy SchSym0) SSch) attrs)- in lambda } ::- Sing (Case_0123456789 name name' u attrs (Let0123456789Scrutinee_0123456789Sym4 name name' u attrs) :: U)- in lambda sName sName' sU sAttrs- sOccurs _s_z_0123456789 (SSch SNil)- = let- lambda ::- forall _z_0123456789.- (t ~ _z_0123456789, t ~ Apply SchSym0 '[]) =>- Sing _z_0123456789 -> Sing (Apply (Apply OccursSym0 t) t :: Bool)- lambda _z_0123456789 = SFalse- in lambda _s_z_0123456789- sOccurs sName (SSch (SCons (SAttr sName' _s_z_0123456789) sAttrs))- = let- lambda ::- forall name name' _z_0123456789 attrs.- (t ~ name,- t ~ Apply SchSym0 (Apply (Apply (:$) (Apply (Apply AttrSym0 name') _z_0123456789)) attrs)) =>- Sing name- -> Sing name'- -> Sing _z_0123456789- -> Sing attrs -> Sing (Apply (Apply OccursSym0 t) t :: Bool)- lambda name name' _z_0123456789 attrs- = applySing- (applySing- (singFun2 (Proxy :: Proxy (:||$)) (%:||))- (applySing- (applySing (singFun2 (Proxy :: Proxy (:==$)) (%:==)) name) name'))- (applySing- (applySing (singFun2 (Proxy :: Proxy OccursSym0) sOccurs) name)- (applySing (singFun1 (Proxy :: Proxy SchSym0) SSch) attrs))- in lambda sName sName' _s_z_0123456789 sAttrs- sAttrNotIn _s_z_0123456789 (SSch SNil)- = let- lambda ::- forall _z_0123456789.- (t ~ _z_0123456789, t ~ Apply SchSym0 '[]) =>- Sing _z_0123456789- -> Sing (Apply (Apply AttrNotInSym0 t) t :: Bool)- lambda _z_0123456789 = STrue- in lambda _s_z_0123456789- sAttrNotIn- (SAttr sName sU)- (SSch (SCons (SAttr sName' _s_z_0123456789) sT))- = let- lambda ::- forall name u name' _z_0123456789 t.- (t ~ Apply (Apply AttrSym0 name) u,- t ~ Apply SchSym0 (Apply (Apply (:$) (Apply (Apply AttrSym0 name') _z_0123456789)) t)) =>- Sing name- -> Sing u- -> Sing name'- -> Sing _z_0123456789- -> Sing t -> Sing (Apply (Apply AttrNotInSym0 t) t :: Bool)- lambda name u name' _z_0123456789 t- = applySing- (applySing- (singFun2 (Proxy :: Proxy (:&&$)) (%:&&))- (applySing- (applySing (singFun2 (Proxy :: Proxy (:/=$)) (%:/=)) name) name'))- (applySing- (applySing- (singFun2 (Proxy :: Proxy AttrNotInSym0) sAttrNotIn)- (applySing- (applySing (singFun2 (Proxy :: Proxy AttrSym0) SAttr) name) u))- (applySing (singFun1 (Proxy :: Proxy SchSym0) SSch) t))- in lambda sName sU sName' _s_z_0123456789 sT- sDisjoint (SSch SNil) _s_z_0123456789- = let- lambda ::- forall _z_0123456789.- (t ~ Apply SchSym0 '[], t ~ _z_0123456789) =>- Sing _z_0123456789 -> Sing (Apply (Apply DisjointSym0 t) t :: Bool)- lambda _z_0123456789 = STrue- in lambda _s_z_0123456789- sDisjoint (SSch (SCons sH sT)) sS- = let- lambda ::- forall h t s.- (t ~ Apply SchSym0 (Apply (Apply (:$) h) t), t ~ s) =>- Sing h- -> Sing t- -> Sing s -> Sing (Apply (Apply DisjointSym0 t) t :: Bool)- lambda h t s- = applySing- (applySing- (singFun2 (Proxy :: Proxy (:&&$)) (%:&&))- (applySing- (applySing (singFun2 (Proxy :: Proxy AttrNotInSym0) sAttrNotIn) h)- s))- (applySing- (applySing- (singFun2 (Proxy :: Proxy DisjointSym0) sDisjoint)- (applySing (singFun1 (Proxy :: Proxy SchSym0) SSch) t))- s)- in lambda sH sT sS- sAppend (SSch sS1) (SSch sS2)- = let- lambda ::- forall s1 s2.- (t ~ Apply SchSym0 s1, t ~ Apply SchSym0 s2) =>- Sing s1 -> Sing s2 -> Sing (Apply (Apply AppendSym0 t) t :: Schema)- lambda s1 s2- = applySing- (singFun1 (Proxy :: Proxy SchSym0) SSch)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:++$)) (%:++)) s1) s2)- in lambda sS1 sS2- data instance Sing (z :: U)- = z ~ BOOL => SBOOL |- z ~ STRING => SSTRING |- z ~ NAT => SNAT |- forall (n :: U) (n :: Nat). z ~ VEC n n =>- SVEC (Sing (n :: U)) (Sing (n :: Nat))- type SU = (Sing :: U -> Type)- instance SingKind U where- type DemoteRep U = U- fromSing SBOOL = BOOL- fromSing SSTRING = STRING- fromSing SNAT = NAT- fromSing (SVEC b b) = VEC (fromSing b) (fromSing b)- toSing BOOL = SomeSing SBOOL- toSing STRING = SomeSing SSTRING- toSing NAT = SomeSing SNAT- toSing (VEC b b)- = case- GHC.Tuple.(,) (toSing b :: SomeSing U) (toSing b :: SomeSing Nat)- of {- GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing (SVEC c c) }- instance SEq U where- (%:==) SBOOL SBOOL = STrue- (%:==) SBOOL SSTRING = SFalse- (%:==) SBOOL SNAT = SFalse- (%:==) SBOOL (SVEC _ _) = SFalse- (%:==) SSTRING SBOOL = SFalse- (%:==) SSTRING SSTRING = STrue- (%:==) SSTRING SNAT = SFalse- (%:==) SSTRING (SVEC _ _) = SFalse- (%:==) SNAT SBOOL = SFalse- (%:==) SNAT SSTRING = SFalse- (%:==) SNAT SNAT = STrue- (%:==) SNAT (SVEC _ _) = SFalse- (%:==) (SVEC _ _) SBOOL = SFalse- (%:==) (SVEC _ _) SSTRING = SFalse- (%:==) (SVEC _ _) SNAT = SFalse- (%:==) (SVEC a a) (SVEC b b) = (%:&&) ((%:==) a b) ((%:==) a b)- instance SDecide U where- (%~) SBOOL SBOOL = Proved Refl- (%~) SBOOL SSTRING- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SBOOL SNAT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SBOOL (SVEC _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SSTRING SBOOL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SSTRING SSTRING = Proved Refl- (%~) SSTRING SNAT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SSTRING (SVEC _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SNAT SBOOL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SNAT SSTRING- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SNAT SNAT = Proved Refl- (%~) SNAT (SVEC _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SVEC _ _) SBOOL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SVEC _ _) SSTRING- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SVEC _ _) SNAT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SVEC a a) (SVEC b b)- = case GHC.Tuple.(,) ((%~) a b) ((%~) a b) of {- GHC.Tuple.(,) (Proved Refl) (Proved Refl) -> Proved Refl- GHC.Tuple.(,) (Disproved contra) _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,) _ (Disproved contra)- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- data instance Sing (z :: AChar)- = z ~ CA => SCA |- z ~ CB => SCB |- z ~ CC => SCC |- z ~ CD => SCD |- z ~ CE => SCE |- z ~ CF => SCF |- z ~ CG => SCG |- z ~ CH => SCH |- z ~ CI => SCI |- z ~ CJ => SCJ |- z ~ CK => SCK |- z ~ CL => SCL |- z ~ CM => SCM |- z ~ CN => SCN |- z ~ CO => SCO |- z ~ CP => SCP |- z ~ CQ => SCQ |- z ~ CR => SCR |- z ~ CS => SCS |- z ~ CT => SCT |- z ~ CU => SCU |- z ~ CV => SCV |- z ~ CW => SCW |- z ~ CX => SCX |- z ~ CY => SCY |- z ~ CZ => SCZ- type SAChar = (Sing :: AChar -> Type)- instance SingKind AChar where- type DemoteRep AChar = AChar- fromSing SCA = CA- fromSing SCB = CB- fromSing SCC = CC- fromSing SCD = CD- fromSing SCE = CE- fromSing SCF = CF- fromSing SCG = CG- fromSing SCH = CH- fromSing SCI = CI- fromSing SCJ = CJ- fromSing SCK = CK- fromSing SCL = CL- fromSing SCM = CM- fromSing SCN = CN- fromSing SCO = CO- fromSing SCP = CP- fromSing SCQ = CQ- fromSing SCR = CR- fromSing SCS = CS- fromSing SCT = CT- fromSing SCU = CU- fromSing SCV = CV- fromSing SCW = CW- fromSing SCX = CX- fromSing SCY = CY- fromSing SCZ = CZ- toSing CA = SomeSing SCA- toSing CB = SomeSing SCB- toSing CC = SomeSing SCC- toSing CD = SomeSing SCD- toSing CE = SomeSing SCE- toSing CF = SomeSing SCF- toSing CG = SomeSing SCG- toSing CH = SomeSing SCH- toSing CI = SomeSing SCI- toSing CJ = SomeSing SCJ- toSing CK = SomeSing SCK- toSing CL = SomeSing SCL- toSing CM = SomeSing SCM- toSing CN = SomeSing SCN- toSing CO = SomeSing SCO- toSing CP = SomeSing SCP- toSing CQ = SomeSing SCQ- toSing CR = SomeSing SCR- toSing CS = SomeSing SCS- toSing CT = SomeSing SCT- toSing CU = SomeSing SCU- toSing CV = SomeSing SCV- toSing CW = SomeSing SCW- toSing CX = SomeSing SCX- toSing CY = SomeSing SCY- toSing CZ = SomeSing SCZ- instance SEq AChar where- (%:==) SCA SCA = STrue- (%:==) SCA SCB = SFalse- (%:==) SCA SCC = SFalse- (%:==) SCA SCD = SFalse- (%:==) SCA SCE = SFalse- (%:==) SCA SCF = SFalse- (%:==) SCA SCG = SFalse- (%:==) SCA SCH = SFalse- (%:==) SCA SCI = SFalse- (%:==) SCA SCJ = SFalse- (%:==) SCA SCK = SFalse- (%:==) SCA SCL = SFalse- (%:==) SCA SCM = SFalse- (%:==) SCA SCN = SFalse- (%:==) SCA SCO = SFalse- (%:==) SCA SCP = SFalse- (%:==) SCA SCQ = SFalse- (%:==) SCA SCR = SFalse- (%:==) SCA SCS = SFalse- (%:==) SCA SCT = SFalse- (%:==) SCA SCU = SFalse- (%:==) SCA SCV = SFalse- (%:==) SCA SCW = SFalse- (%:==) SCA SCX = SFalse- (%:==) SCA SCY = SFalse- (%:==) SCA SCZ = SFalse- (%:==) SCB SCA = SFalse- (%:==) SCB SCB = STrue- (%:==) SCB SCC = SFalse- (%:==) SCB SCD = SFalse- (%:==) SCB SCE = SFalse- (%:==) SCB SCF = SFalse- (%:==) SCB SCG = SFalse- (%:==) SCB SCH = SFalse- (%:==) SCB SCI = SFalse- (%:==) SCB SCJ = SFalse- (%:==) SCB SCK = SFalse- (%:==) SCB SCL = SFalse- (%:==) SCB SCM = SFalse- (%:==) SCB SCN = SFalse- (%:==) SCB SCO = SFalse- (%:==) SCB SCP = SFalse- (%:==) SCB SCQ = SFalse- (%:==) SCB SCR = SFalse- (%:==) SCB SCS = SFalse- (%:==) SCB SCT = SFalse- (%:==) SCB SCU = SFalse- (%:==) SCB SCV = SFalse- (%:==) SCB SCW = SFalse- (%:==) SCB SCX = SFalse- (%:==) SCB SCY = SFalse- (%:==) SCB SCZ = SFalse- (%:==) SCC SCA = SFalse- (%:==) SCC SCB = SFalse- (%:==) SCC SCC = STrue- (%:==) SCC SCD = SFalse- (%:==) SCC SCE = SFalse- (%:==) SCC SCF = SFalse- (%:==) SCC SCG = SFalse- (%:==) SCC SCH = SFalse- (%:==) SCC SCI = SFalse- (%:==) SCC SCJ = SFalse- (%:==) SCC SCK = SFalse- (%:==) SCC SCL = SFalse- (%:==) SCC SCM = SFalse- (%:==) SCC SCN = SFalse- (%:==) SCC SCO = SFalse- (%:==) SCC SCP = SFalse- (%:==) SCC SCQ = SFalse- (%:==) SCC SCR = SFalse- (%:==) SCC SCS = SFalse- (%:==) SCC SCT = SFalse- (%:==) SCC SCU = SFalse- (%:==) SCC SCV = SFalse- (%:==) SCC SCW = SFalse- (%:==) SCC SCX = SFalse- (%:==) SCC SCY = SFalse- (%:==) SCC SCZ = SFalse- (%:==) SCD SCA = SFalse- (%:==) SCD SCB = SFalse- (%:==) SCD SCC = SFalse- (%:==) SCD SCD = STrue- (%:==) SCD SCE = SFalse- (%:==) SCD SCF = SFalse- (%:==) SCD SCG = SFalse- (%:==) SCD SCH = SFalse- (%:==) SCD SCI = SFalse- (%:==) SCD SCJ = SFalse- (%:==) SCD SCK = SFalse- (%:==) SCD SCL = SFalse- (%:==) SCD SCM = SFalse- (%:==) SCD SCN = SFalse- (%:==) SCD SCO = SFalse- (%:==) SCD SCP = SFalse- (%:==) SCD SCQ = SFalse- (%:==) SCD SCR = SFalse- (%:==) SCD SCS = SFalse- (%:==) SCD SCT = SFalse- (%:==) SCD SCU = SFalse- (%:==) SCD SCV = SFalse- (%:==) SCD SCW = SFalse- (%:==) SCD SCX = SFalse- (%:==) SCD SCY = SFalse- (%:==) SCD SCZ = SFalse- (%:==) SCE SCA = SFalse- (%:==) SCE SCB = SFalse- (%:==) SCE SCC = SFalse- (%:==) SCE SCD = SFalse- (%:==) SCE SCE = STrue- (%:==) SCE SCF = SFalse- (%:==) SCE SCG = SFalse- (%:==) SCE SCH = SFalse- (%:==) SCE SCI = SFalse- (%:==) SCE SCJ = SFalse- (%:==) SCE SCK = SFalse- (%:==) SCE SCL = SFalse- (%:==) SCE SCM = SFalse- (%:==) SCE SCN = SFalse- (%:==) SCE SCO = SFalse- (%:==) SCE SCP = SFalse- (%:==) SCE SCQ = SFalse- (%:==) SCE SCR = SFalse- (%:==) SCE SCS = SFalse- (%:==) SCE SCT = SFalse- (%:==) SCE SCU = SFalse- (%:==) SCE SCV = SFalse- (%:==) SCE SCW = SFalse- (%:==) SCE SCX = SFalse- (%:==) SCE SCY = SFalse- (%:==) SCE SCZ = SFalse- (%:==) SCF SCA = SFalse- (%:==) SCF SCB = SFalse- (%:==) SCF SCC = SFalse- (%:==) SCF SCD = SFalse- (%:==) SCF SCE = SFalse- (%:==) SCF SCF = STrue- (%:==) SCF SCG = SFalse- (%:==) SCF SCH = SFalse- (%:==) SCF SCI = SFalse- (%:==) SCF SCJ = SFalse- (%:==) SCF SCK = SFalse- (%:==) SCF SCL = SFalse- (%:==) SCF SCM = SFalse- (%:==) SCF SCN = SFalse- (%:==) SCF SCO = SFalse- (%:==) SCF SCP = SFalse- (%:==) SCF SCQ = SFalse- (%:==) SCF SCR = SFalse- (%:==) SCF SCS = SFalse- (%:==) SCF SCT = SFalse- (%:==) SCF SCU = SFalse- (%:==) SCF SCV = SFalse- (%:==) SCF SCW = SFalse- (%:==) SCF SCX = SFalse- (%:==) SCF SCY = SFalse- (%:==) SCF SCZ = SFalse- (%:==) SCG SCA = SFalse- (%:==) SCG SCB = SFalse- (%:==) SCG SCC = SFalse- (%:==) SCG SCD = SFalse- (%:==) SCG SCE = SFalse- (%:==) SCG SCF = SFalse- (%:==) SCG SCG = STrue- (%:==) SCG SCH = SFalse- (%:==) SCG SCI = SFalse- (%:==) SCG SCJ = SFalse- (%:==) SCG SCK = SFalse- (%:==) SCG SCL = SFalse- (%:==) SCG SCM = SFalse- (%:==) SCG SCN = SFalse- (%:==) SCG SCO = SFalse- (%:==) SCG SCP = SFalse- (%:==) SCG SCQ = SFalse- (%:==) SCG SCR = SFalse- (%:==) SCG SCS = SFalse- (%:==) SCG SCT = SFalse- (%:==) SCG SCU = SFalse- (%:==) SCG SCV = SFalse- (%:==) SCG SCW = SFalse- (%:==) SCG SCX = SFalse- (%:==) SCG SCY = SFalse- (%:==) SCG SCZ = SFalse- (%:==) SCH SCA = SFalse- (%:==) SCH SCB = SFalse- (%:==) SCH SCC = SFalse- (%:==) SCH SCD = SFalse- (%:==) SCH SCE = SFalse- (%:==) SCH SCF = SFalse- (%:==) SCH SCG = SFalse- (%:==) SCH SCH = STrue- (%:==) SCH SCI = SFalse- (%:==) SCH SCJ = SFalse- (%:==) SCH SCK = SFalse- (%:==) SCH SCL = SFalse- (%:==) SCH SCM = SFalse- (%:==) SCH SCN = SFalse- (%:==) SCH SCO = SFalse- (%:==) SCH SCP = SFalse- (%:==) SCH SCQ = SFalse- (%:==) SCH SCR = SFalse- (%:==) SCH SCS = SFalse- (%:==) SCH SCT = SFalse- (%:==) SCH SCU = SFalse- (%:==) SCH SCV = SFalse- (%:==) SCH SCW = SFalse- (%:==) SCH SCX = SFalse- (%:==) SCH SCY = SFalse- (%:==) SCH SCZ = SFalse- (%:==) SCI SCA = SFalse- (%:==) SCI SCB = SFalse- (%:==) SCI SCC = SFalse- (%:==) SCI SCD = SFalse- (%:==) SCI SCE = SFalse- (%:==) SCI SCF = SFalse- (%:==) SCI SCG = SFalse- (%:==) SCI SCH = SFalse- (%:==) SCI SCI = STrue- (%:==) SCI SCJ = SFalse- (%:==) SCI SCK = SFalse- (%:==) SCI SCL = SFalse- (%:==) SCI SCM = SFalse- (%:==) SCI SCN = SFalse- (%:==) SCI SCO = SFalse- (%:==) SCI SCP = SFalse- (%:==) SCI SCQ = SFalse- (%:==) SCI SCR = SFalse- (%:==) SCI SCS = SFalse- (%:==) SCI SCT = SFalse- (%:==) SCI SCU = SFalse- (%:==) SCI SCV = SFalse- (%:==) SCI SCW = SFalse- (%:==) SCI SCX = SFalse- (%:==) SCI SCY = SFalse- (%:==) SCI SCZ = SFalse- (%:==) SCJ SCA = SFalse- (%:==) SCJ SCB = SFalse- (%:==) SCJ SCC = SFalse- (%:==) SCJ SCD = SFalse- (%:==) SCJ SCE = SFalse- (%:==) SCJ SCF = SFalse- (%:==) SCJ SCG = SFalse- (%:==) SCJ SCH = SFalse- (%:==) SCJ SCI = SFalse- (%:==) SCJ SCJ = STrue- (%:==) SCJ SCK = SFalse- (%:==) SCJ SCL = SFalse- (%:==) SCJ SCM = SFalse- (%:==) SCJ SCN = SFalse- (%:==) SCJ SCO = SFalse- (%:==) SCJ SCP = SFalse- (%:==) SCJ SCQ = SFalse- (%:==) SCJ SCR = SFalse- (%:==) SCJ SCS = SFalse- (%:==) SCJ SCT = SFalse- (%:==) SCJ SCU = SFalse- (%:==) SCJ SCV = SFalse- (%:==) SCJ SCW = SFalse- (%:==) SCJ SCX = SFalse- (%:==) SCJ SCY = SFalse- (%:==) SCJ SCZ = SFalse- (%:==) SCK SCA = SFalse- (%:==) SCK SCB = SFalse- (%:==) SCK SCC = SFalse- (%:==) SCK SCD = SFalse- (%:==) SCK SCE = SFalse- (%:==) SCK SCF = SFalse- (%:==) SCK SCG = SFalse- (%:==) SCK SCH = SFalse- (%:==) SCK SCI = SFalse- (%:==) SCK SCJ = SFalse- (%:==) SCK SCK = STrue- (%:==) SCK SCL = SFalse- (%:==) SCK SCM = SFalse- (%:==) SCK SCN = SFalse- (%:==) SCK SCO = SFalse- (%:==) SCK SCP = SFalse- (%:==) SCK SCQ = SFalse- (%:==) SCK SCR = SFalse- (%:==) SCK SCS = SFalse- (%:==) SCK SCT = SFalse- (%:==) SCK SCU = SFalse- (%:==) SCK SCV = SFalse- (%:==) SCK SCW = SFalse- (%:==) SCK SCX = SFalse- (%:==) SCK SCY = SFalse- (%:==) SCK SCZ = SFalse- (%:==) SCL SCA = SFalse- (%:==) SCL SCB = SFalse- (%:==) SCL SCC = SFalse- (%:==) SCL SCD = SFalse- (%:==) SCL SCE = SFalse- (%:==) SCL SCF = SFalse- (%:==) SCL SCG = SFalse- (%:==) SCL SCH = SFalse- (%:==) SCL SCI = SFalse- (%:==) SCL SCJ = SFalse- (%:==) SCL SCK = SFalse- (%:==) SCL SCL = STrue- (%:==) SCL SCM = SFalse- (%:==) SCL SCN = SFalse- (%:==) SCL SCO = SFalse- (%:==) SCL SCP = SFalse- (%:==) SCL SCQ = SFalse- (%:==) SCL SCR = SFalse- (%:==) SCL SCS = SFalse- (%:==) SCL SCT = SFalse- (%:==) SCL SCU = SFalse- (%:==) SCL SCV = SFalse- (%:==) SCL SCW = SFalse- (%:==) SCL SCX = SFalse- (%:==) SCL SCY = SFalse- (%:==) SCL SCZ = SFalse- (%:==) SCM SCA = SFalse- (%:==) SCM SCB = SFalse- (%:==) SCM SCC = SFalse- (%:==) SCM SCD = SFalse- (%:==) SCM SCE = SFalse- (%:==) SCM SCF = SFalse- (%:==) SCM SCG = SFalse- (%:==) SCM SCH = SFalse- (%:==) SCM SCI = SFalse- (%:==) SCM SCJ = SFalse- (%:==) SCM SCK = SFalse- (%:==) SCM SCL = SFalse- (%:==) SCM SCM = STrue- (%:==) SCM SCN = SFalse- (%:==) SCM SCO = SFalse- (%:==) SCM SCP = SFalse- (%:==) SCM SCQ = SFalse- (%:==) SCM SCR = SFalse- (%:==) SCM SCS = SFalse- (%:==) SCM SCT = SFalse- (%:==) SCM SCU = SFalse- (%:==) SCM SCV = SFalse- (%:==) SCM SCW = SFalse- (%:==) SCM SCX = SFalse- (%:==) SCM SCY = SFalse- (%:==) SCM SCZ = SFalse- (%:==) SCN SCA = SFalse- (%:==) SCN SCB = SFalse- (%:==) SCN SCC = SFalse- (%:==) SCN SCD = SFalse- (%:==) SCN SCE = SFalse- (%:==) SCN SCF = SFalse- (%:==) SCN SCG = SFalse- (%:==) SCN SCH = SFalse- (%:==) SCN SCI = SFalse- (%:==) SCN SCJ = SFalse- (%:==) SCN SCK = SFalse- (%:==) SCN SCL = SFalse- (%:==) SCN SCM = SFalse- (%:==) SCN SCN = STrue- (%:==) SCN SCO = SFalse- (%:==) SCN SCP = SFalse- (%:==) SCN SCQ = SFalse- (%:==) SCN SCR = SFalse- (%:==) SCN SCS = SFalse- (%:==) SCN SCT = SFalse- (%:==) SCN SCU = SFalse- (%:==) SCN SCV = SFalse- (%:==) SCN SCW = SFalse- (%:==) SCN SCX = SFalse- (%:==) SCN SCY = SFalse- (%:==) SCN SCZ = SFalse- (%:==) SCO SCA = SFalse- (%:==) SCO SCB = SFalse- (%:==) SCO SCC = SFalse- (%:==) SCO SCD = SFalse- (%:==) SCO SCE = SFalse- (%:==) SCO SCF = SFalse- (%:==) SCO SCG = SFalse- (%:==) SCO SCH = SFalse- (%:==) SCO SCI = SFalse- (%:==) SCO SCJ = SFalse- (%:==) SCO SCK = SFalse- (%:==) SCO SCL = SFalse- (%:==) SCO SCM = SFalse- (%:==) SCO SCN = SFalse- (%:==) SCO SCO = STrue- (%:==) SCO SCP = SFalse- (%:==) SCO SCQ = SFalse- (%:==) SCO SCR = SFalse- (%:==) SCO SCS = SFalse- (%:==) SCO SCT = SFalse- (%:==) SCO SCU = SFalse- (%:==) SCO SCV = SFalse- (%:==) SCO SCW = SFalse- (%:==) SCO SCX = SFalse- (%:==) SCO SCY = SFalse- (%:==) SCO SCZ = SFalse- (%:==) SCP SCA = SFalse- (%:==) SCP SCB = SFalse- (%:==) SCP SCC = SFalse- (%:==) SCP SCD = SFalse- (%:==) SCP SCE = SFalse- (%:==) SCP SCF = SFalse- (%:==) SCP SCG = SFalse- (%:==) SCP SCH = SFalse- (%:==) SCP SCI = SFalse- (%:==) SCP SCJ = SFalse- (%:==) SCP SCK = SFalse- (%:==) SCP SCL = SFalse- (%:==) SCP SCM = SFalse- (%:==) SCP SCN = SFalse- (%:==) SCP SCO = SFalse- (%:==) SCP SCP = STrue- (%:==) SCP SCQ = SFalse- (%:==) SCP SCR = SFalse- (%:==) SCP SCS = SFalse- (%:==) SCP SCT = SFalse- (%:==) SCP SCU = SFalse- (%:==) SCP SCV = SFalse- (%:==) SCP SCW = SFalse- (%:==) SCP SCX = SFalse- (%:==) SCP SCY = SFalse- (%:==) SCP SCZ = SFalse- (%:==) SCQ SCA = SFalse- (%:==) SCQ SCB = SFalse- (%:==) SCQ SCC = SFalse- (%:==) SCQ SCD = SFalse- (%:==) SCQ SCE = SFalse- (%:==) SCQ SCF = SFalse- (%:==) SCQ SCG = SFalse- (%:==) SCQ SCH = SFalse- (%:==) SCQ SCI = SFalse- (%:==) SCQ SCJ = SFalse- (%:==) SCQ SCK = SFalse- (%:==) SCQ SCL = SFalse- (%:==) SCQ SCM = SFalse- (%:==) SCQ SCN = SFalse- (%:==) SCQ SCO = SFalse- (%:==) SCQ SCP = SFalse- (%:==) SCQ SCQ = STrue- (%:==) SCQ SCR = SFalse- (%:==) SCQ SCS = SFalse- (%:==) SCQ SCT = SFalse- (%:==) SCQ SCU = SFalse- (%:==) SCQ SCV = SFalse- (%:==) SCQ SCW = SFalse- (%:==) SCQ SCX = SFalse- (%:==) SCQ SCY = SFalse- (%:==) SCQ SCZ = SFalse- (%:==) SCR SCA = SFalse- (%:==) SCR SCB = SFalse- (%:==) SCR SCC = SFalse- (%:==) SCR SCD = SFalse- (%:==) SCR SCE = SFalse- (%:==) SCR SCF = SFalse- (%:==) SCR SCG = SFalse- (%:==) SCR SCH = SFalse- (%:==) SCR SCI = SFalse- (%:==) SCR SCJ = SFalse- (%:==) SCR SCK = SFalse- (%:==) SCR SCL = SFalse- (%:==) SCR SCM = SFalse- (%:==) SCR SCN = SFalse- (%:==) SCR SCO = SFalse- (%:==) SCR SCP = SFalse- (%:==) SCR SCQ = SFalse- (%:==) SCR SCR = STrue- (%:==) SCR SCS = SFalse- (%:==) SCR SCT = SFalse- (%:==) SCR SCU = SFalse- (%:==) SCR SCV = SFalse- (%:==) SCR SCW = SFalse- (%:==) SCR SCX = SFalse- (%:==) SCR SCY = SFalse- (%:==) SCR SCZ = SFalse- (%:==) SCS SCA = SFalse- (%:==) SCS SCB = SFalse- (%:==) SCS SCC = SFalse- (%:==) SCS SCD = SFalse- (%:==) SCS SCE = SFalse- (%:==) SCS SCF = SFalse- (%:==) SCS SCG = SFalse- (%:==) SCS SCH = SFalse- (%:==) SCS SCI = SFalse- (%:==) SCS SCJ = SFalse- (%:==) SCS SCK = SFalse- (%:==) SCS SCL = SFalse- (%:==) SCS SCM = SFalse- (%:==) SCS SCN = SFalse- (%:==) SCS SCO = SFalse- (%:==) SCS SCP = SFalse- (%:==) SCS SCQ = SFalse- (%:==) SCS SCR = SFalse- (%:==) SCS SCS = STrue- (%:==) SCS SCT = SFalse- (%:==) SCS SCU = SFalse- (%:==) SCS SCV = SFalse- (%:==) SCS SCW = SFalse- (%:==) SCS SCX = SFalse- (%:==) SCS SCY = SFalse- (%:==) SCS SCZ = SFalse- (%:==) SCT SCA = SFalse- (%:==) SCT SCB = SFalse- (%:==) SCT SCC = SFalse- (%:==) SCT SCD = SFalse- (%:==) SCT SCE = SFalse- (%:==) SCT SCF = SFalse- (%:==) SCT SCG = SFalse- (%:==) SCT SCH = SFalse- (%:==) SCT SCI = SFalse- (%:==) SCT SCJ = SFalse- (%:==) SCT SCK = SFalse- (%:==) SCT SCL = SFalse- (%:==) SCT SCM = SFalse- (%:==) SCT SCN = SFalse- (%:==) SCT SCO = SFalse- (%:==) SCT SCP = SFalse- (%:==) SCT SCQ = SFalse- (%:==) SCT SCR = SFalse- (%:==) SCT SCS = SFalse- (%:==) SCT SCT = STrue- (%:==) SCT SCU = SFalse- (%:==) SCT SCV = SFalse- (%:==) SCT SCW = SFalse- (%:==) SCT SCX = SFalse- (%:==) SCT SCY = SFalse- (%:==) SCT SCZ = SFalse- (%:==) SCU SCA = SFalse- (%:==) SCU SCB = SFalse- (%:==) SCU SCC = SFalse- (%:==) SCU SCD = SFalse- (%:==) SCU SCE = SFalse- (%:==) SCU SCF = SFalse- (%:==) SCU SCG = SFalse- (%:==) SCU SCH = SFalse- (%:==) SCU SCI = SFalse- (%:==) SCU SCJ = SFalse- (%:==) SCU SCK = SFalse- (%:==) SCU SCL = SFalse- (%:==) SCU SCM = SFalse- (%:==) SCU SCN = SFalse- (%:==) SCU SCO = SFalse- (%:==) SCU SCP = SFalse- (%:==) SCU SCQ = SFalse- (%:==) SCU SCR = SFalse- (%:==) SCU SCS = SFalse- (%:==) SCU SCT = SFalse- (%:==) SCU SCU = STrue- (%:==) SCU SCV = SFalse- (%:==) SCU SCW = SFalse- (%:==) SCU SCX = SFalse- (%:==) SCU SCY = SFalse- (%:==) SCU SCZ = SFalse- (%:==) SCV SCA = SFalse- (%:==) SCV SCB = SFalse- (%:==) SCV SCC = SFalse- (%:==) SCV SCD = SFalse- (%:==) SCV SCE = SFalse- (%:==) SCV SCF = SFalse- (%:==) SCV SCG = SFalse- (%:==) SCV SCH = SFalse- (%:==) SCV SCI = SFalse- (%:==) SCV SCJ = SFalse- (%:==) SCV SCK = SFalse- (%:==) SCV SCL = SFalse- (%:==) SCV SCM = SFalse- (%:==) SCV SCN = SFalse- (%:==) SCV SCO = SFalse- (%:==) SCV SCP = SFalse- (%:==) SCV SCQ = SFalse- (%:==) SCV SCR = SFalse- (%:==) SCV SCS = SFalse- (%:==) SCV SCT = SFalse- (%:==) SCV SCU = SFalse- (%:==) SCV SCV = STrue- (%:==) SCV SCW = SFalse- (%:==) SCV SCX = SFalse- (%:==) SCV SCY = SFalse- (%:==) SCV SCZ = SFalse- (%:==) SCW SCA = SFalse- (%:==) SCW SCB = SFalse- (%:==) SCW SCC = SFalse- (%:==) SCW SCD = SFalse- (%:==) SCW SCE = SFalse- (%:==) SCW SCF = SFalse- (%:==) SCW SCG = SFalse- (%:==) SCW SCH = SFalse- (%:==) SCW SCI = SFalse- (%:==) SCW SCJ = SFalse- (%:==) SCW SCK = SFalse- (%:==) SCW SCL = SFalse- (%:==) SCW SCM = SFalse- (%:==) SCW SCN = SFalse- (%:==) SCW SCO = SFalse- (%:==) SCW SCP = SFalse- (%:==) SCW SCQ = SFalse- (%:==) SCW SCR = SFalse- (%:==) SCW SCS = SFalse- (%:==) SCW SCT = SFalse- (%:==) SCW SCU = SFalse- (%:==) SCW SCV = SFalse- (%:==) SCW SCW = STrue- (%:==) SCW SCX = SFalse- (%:==) SCW SCY = SFalse- (%:==) SCW SCZ = SFalse- (%:==) SCX SCA = SFalse- (%:==) SCX SCB = SFalse- (%:==) SCX SCC = SFalse- (%:==) SCX SCD = SFalse- (%:==) SCX SCE = SFalse- (%:==) SCX SCF = SFalse- (%:==) SCX SCG = SFalse- (%:==) SCX SCH = SFalse- (%:==) SCX SCI = SFalse- (%:==) SCX SCJ = SFalse- (%:==) SCX SCK = SFalse- (%:==) SCX SCL = SFalse- (%:==) SCX SCM = SFalse- (%:==) SCX SCN = SFalse- (%:==) SCX SCO = SFalse- (%:==) SCX SCP = SFalse- (%:==) SCX SCQ = SFalse- (%:==) SCX SCR = SFalse- (%:==) SCX SCS = SFalse- (%:==) SCX SCT = SFalse- (%:==) SCX SCU = SFalse- (%:==) SCX SCV = SFalse- (%:==) SCX SCW = SFalse- (%:==) SCX SCX = STrue- (%:==) SCX SCY = SFalse- (%:==) SCX SCZ = SFalse- (%:==) SCY SCA = SFalse- (%:==) SCY SCB = SFalse- (%:==) SCY SCC = SFalse- (%:==) SCY SCD = SFalse- (%:==) SCY SCE = SFalse- (%:==) SCY SCF = SFalse- (%:==) SCY SCG = SFalse- (%:==) SCY SCH = SFalse- (%:==) SCY SCI = SFalse- (%:==) SCY SCJ = SFalse- (%:==) SCY SCK = SFalse- (%:==) SCY SCL = SFalse- (%:==) SCY SCM = SFalse- (%:==) SCY SCN = SFalse- (%:==) SCY SCO = SFalse- (%:==) SCY SCP = SFalse- (%:==) SCY SCQ = SFalse- (%:==) SCY SCR = SFalse- (%:==) SCY SCS = SFalse- (%:==) SCY SCT = SFalse- (%:==) SCY SCU = SFalse- (%:==) SCY SCV = SFalse- (%:==) SCY SCW = SFalse- (%:==) SCY SCX = SFalse- (%:==) SCY SCY = STrue- (%:==) SCY SCZ = SFalse- (%:==) SCZ SCA = SFalse- (%:==) SCZ SCB = SFalse- (%:==) SCZ SCC = SFalse- (%:==) SCZ SCD = SFalse- (%:==) SCZ SCE = SFalse- (%:==) SCZ SCF = SFalse- (%:==) SCZ SCG = SFalse- (%:==) SCZ SCH = SFalse- (%:==) SCZ SCI = SFalse- (%:==) SCZ SCJ = SFalse- (%:==) SCZ SCK = SFalse- (%:==) SCZ SCL = SFalse- (%:==) SCZ SCM = SFalse- (%:==) SCZ SCN = SFalse- (%:==) SCZ SCO = SFalse- (%:==) SCZ SCP = SFalse- (%:==) SCZ SCQ = SFalse- (%:==) SCZ SCR = SFalse- (%:==) SCZ SCS = SFalse- (%:==) SCZ SCT = SFalse- (%:==) SCZ SCU = SFalse- (%:==) SCZ SCV = SFalse- (%:==) SCZ SCW = SFalse- (%:==) SCZ SCX = SFalse- (%:==) SCZ SCY = SFalse- (%:==) SCZ SCZ = STrue- instance SDecide AChar where- (%~) SCA SCA = Proved Refl- (%~) SCA SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCA SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCB = Proved Refl- (%~) SCB SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCB SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCC = Proved Refl- (%~) SCC SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCC SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCD = Proved Refl- (%~) SCD SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCD SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCE = Proved Refl- (%~) SCE SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCE SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCF = Proved Refl- (%~) SCF SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCF SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCG = Proved Refl- (%~) SCG SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCG SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCH = Proved Refl- (%~) SCH SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCH SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCI = Proved Refl- (%~) SCI SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCI SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCJ = Proved Refl- (%~) SCJ SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCJ SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCK = Proved Refl- (%~) SCK SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCK SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCL = Proved Refl- (%~) SCL SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCL SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCM = Proved Refl- (%~) SCM SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCM SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCN = Proved Refl- (%~) SCN SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCN SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCO = Proved Refl- (%~) SCO SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCO SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCP = Proved Refl- (%~) SCP SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCP SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCQ = Proved Refl- (%~) SCQ SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCQ SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCR = Proved Refl- (%~) SCR SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCR SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCS = Proved Refl- (%~) SCS SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCS SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCT = Proved Refl- (%~) SCT SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCT SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCU = Proved Refl- (%~) SCU SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCU SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCV = Proved Refl- (%~) SCV SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCV SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCW = Proved Refl- (%~) SCW SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCW SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCX = Proved Refl- (%~) SCX SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCX SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCY SCY = Proved Refl- (%~) SCY SCZ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCA- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCB- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCC- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCD- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCE- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCF- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCG- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCH- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCI- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCJ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCK- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCL- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCM- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCN- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCO- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCP- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCQ- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCR- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCS- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCT- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCU- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCV- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCW- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCX- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCY- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SCZ SCZ = Proved Refl- data instance Sing (z :: Attribute)- = forall (n :: [AChar]) (n :: U). z ~ Attr n n =>- SAttr (Sing (n :: [AChar])) (Sing (n :: U))- type SAttribute = (Sing :: Attribute -> Type)- instance SingKind Attribute where- type DemoteRep Attribute = Attribute- fromSing (SAttr b b) = Attr (fromSing b) (fromSing b)- toSing (Attr b b)- = case- GHC.Tuple.(,)- (toSing b :: SomeSing [AChar]) (toSing b :: SomeSing U)- of {- GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing (SAttr c c) }- data instance Sing (z :: Schema)- = forall (n :: [Attribute]). z ~ Sch n =>- SSch (Sing (n :: [Attribute]))- type SSchema = (Sing :: Schema -> Type)- instance SingKind Schema where- type DemoteRep Schema = Schema- fromSing (SSch b) = Sch (fromSing b)- toSing (Sch b)- = case toSing b :: SomeSing [Attribute] of {- SomeSing c -> SomeSing (SSch c) }- instance SingI BOOL where- sing = SBOOL- instance SingI STRING where- sing = SSTRING- instance SingI NAT where- sing = SNAT- instance (SingI n, SingI n) =>- SingI (VEC (n :: U) (n :: Nat)) where- sing = SVEC sing sing- instance SingI CA where- sing = SCA- instance SingI CB where- sing = SCB- instance SingI CC where- sing = SCC- instance SingI CD where- sing = SCD- instance SingI CE where- sing = SCE- instance SingI CF where- sing = SCF- instance SingI CG where- sing = SCG- instance SingI CH where- sing = SCH- instance SingI CI where- sing = SCI- instance SingI CJ where- sing = SCJ- instance SingI CK where- sing = SCK- instance SingI CL where- sing = SCL- instance SingI CM where- sing = SCM- instance SingI CN where- sing = SCN- instance SingI CO where- sing = SCO- instance SingI CP where- sing = SCP- instance SingI CQ where- sing = SCQ- instance SingI CR where- sing = SCR- instance SingI CS where- sing = SCS- instance SingI CT where- sing = SCT- instance SingI CU where- sing = SCU- instance SingI CV where- sing = SCV- instance SingI CW where- sing = SCW- instance SingI CX where- sing = SCX- instance SingI CY where- sing = SCY- instance SingI CZ where- sing = SCZ- instance (SingI n, SingI n) =>- SingI (Attr (n :: [AChar]) (n :: U)) where- sing = SAttr sing sing- instance SingI n => SingI (Sch (n :: [Attribute])) where- sing = SSch sing-GradingClient/Database.hs:0:0:: Splicing declarations- return [] ======>-GradingClient/Database.hs:(0,0)-(0,0): Splicing expression- cases ''Row [| r |] [| changeId (n ++ (getId r)) r |]- ======>- case r of {- EmptyRow _ -> changeId ((++) n (getId r)) r- ConsRow _ _ -> changeId ((++) n (getId r)) r }
+ tests/compile-and-dump/GradingClient/Database.ghc82.template view
@@ -0,0 +1,4784 @@+GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| data Nat+ = Zero | Succ Nat+ deriving (Eq, Ord) |]+ ======>+ data Nat+ = Zero | Succ Nat+ deriving (Eq, Ord)+ type family Equals_0123456789876543210 (a :: Nat) (b :: Nat) :: Bool where+ Equals_0123456789876543210 Zero Zero = TrueSym0+ Equals_0123456789876543210 (Succ a) (Succ b) = (:==) a b+ Equals_0123456789876543210 (a :: Nat) (b :: Nat) = FalseSym0+ instance PEq Nat where+ type (:==) (a :: Nat) (b :: Nat) = Equals_0123456789876543210 a b+ type ZeroSym0 = Zero+ type SuccSym1 (t :: Nat) = Succ t+ instance SuppressUnusedWarnings SuccSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) SuccSym0KindInference) GHC.Tuple.())+ data SuccSym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>+ SuccSym0KindInference+ type instance Apply SuccSym0 l = Succ l+ type family Compare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where+ Compare_0123456789876543210 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]+ Compare_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])+ Compare_0123456789876543210 Zero (Succ _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (Succ _z_0123456789876543210) Zero = GTSym0+ type Compare_0123456789876543210Sym2 (t :: Nat) (t :: Nat) =+ Compare_0123456789876543210 t t+ instance SuppressUnusedWarnings Compare_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym1 (l :: Nat) (l :: TyFun Nat Ordering)+ = forall arg. SameKind (Apply (Compare_0123456789876543210Sym1 l) arg) (Compare_0123456789876543210Sym2 l arg) =>+ Compare_0123456789876543210Sym1KindInference+ type instance Apply (Compare_0123456789876543210Sym1 l) l = Compare_0123456789876543210 l l+ instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym0 (l :: TyFun Nat (TyFun Nat Ordering+ -> Type))+ = forall arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>+ Compare_0123456789876543210Sym0KindInference+ type instance Apply Compare_0123456789876543210Sym0 l = Compare_0123456789876543210Sym1 l+ instance POrd Nat where+ type Compare (a :: Nat) (a :: Nat) = Apply (Apply Compare_0123456789876543210Sym0 a) a+ data instance Sing (z :: Nat)+ = z ~ Zero => SZero |+ forall (n :: Nat). z ~ Succ n => SSucc (Sing (n :: Nat))+ type SNat = (Sing :: Nat -> Type)+ instance SingKind Nat where+ type Demote Nat = Nat+ fromSing SZero = Zero+ fromSing (SSucc b) = Succ (fromSing b)+ toSing Zero = SomeSing SZero+ toSing (Succ b)+ = case toSing b :: SomeSing Nat of {+ SomeSing c -> SomeSing (SSucc c) }+ instance SEq Nat where+ (%:==) SZero SZero = STrue+ (%:==) SZero (SSucc _) = SFalse+ (%:==) (SSucc _) SZero = SFalse+ (%:==) (SSucc a) (SSucc b) = ((%:==) a) b+ instance SDecide Nat where+ (%~) SZero SZero = Proved Refl+ (%~) SZero (SSucc _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SSucc _) SZero+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SSucc a) (SSucc b)+ = case ((%~) a) b of+ Proved Refl -> Proved Refl+ Disproved contra+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ instance SOrd Nat => SOrd Nat where+ sCompare ::+ forall (t1 :: Nat) (t2 :: Nat).+ Sing t1+ -> Sing t2+ -> Sing (Apply (Apply (CompareSym0 :: TyFun Nat (TyFun Nat Ordering+ -> Type)+ -> Type) t1 :: TyFun Nat Ordering+ -> Type) t2 :: Ordering)+ sCompare SZero SZero+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ SNil+ sCompare+ (SSucc (sA_0123456789876543210 :: Sing a_0123456789876543210))+ (SSucc (sB_0123456789876543210 :: Sing b_0123456789876543210))+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ SNil)+ sCompare SZero (SSucc _) = SLT+ sCompare (SSucc _) SZero = SGT+ instance SingI Zero where+ sing = SZero+ instance SingI n => SingI (Succ (n :: Nat)) where+ sing = SSucc sing+GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| append :: Schema -> Schema -> Schema+ append (Sch s1) (Sch s2) = Sch (s1 ++ s2)+ attrNotIn :: Attribute -> Schema -> Bool+ attrNotIn _ (Sch []) = True+ attrNotIn (Attr name u) (Sch ((Attr name' _) : t))+ = (name /= name') && (attrNotIn (Attr name u) (Sch t))+ disjoint :: Schema -> Schema -> Bool+ disjoint (Sch []) _ = True+ disjoint (Sch (h : t)) s = (attrNotIn h s) && (disjoint (Sch t) s)+ occurs :: [AChar] -> Schema -> Bool+ occurs _ (Sch []) = False+ occurs name (Sch ((Attr name' _) : attrs))+ = name == name' || occurs name (Sch attrs)+ lookup :: [AChar] -> Schema -> U+ lookup _ (Sch []) = undefined+ lookup name (Sch ((Attr name' u) : attrs))+ = if name == name' then u else lookup name (Sch attrs)+ + data U+ = BOOL | STRING | NAT | VEC U Nat+ deriving (Read, Eq, Show)+ data AChar+ = CA |+ CB |+ CC |+ CD |+ CE |+ CF |+ CG |+ CH |+ CI |+ CJ |+ CK |+ CL |+ CM |+ CN |+ CO |+ CP |+ CQ |+ CR |+ CS |+ CT |+ CU |+ CV |+ CW |+ CX |+ CY |+ CZ+ deriving (Read, Show, Eq)+ data Attribute = Attr [AChar] U+ data Schema = Sch [Attribute] |]+ ======>+ data U+ = BOOL | STRING | NAT | VEC U Nat+ deriving (Read, Eq, Show)+ data AChar+ = CA |+ CB |+ CC |+ CD |+ CE |+ CF |+ CG |+ CH |+ CI |+ CJ |+ CK |+ CL |+ CM |+ CN |+ CO |+ CP |+ CQ |+ CR |+ CS |+ CT |+ CU |+ CV |+ CW |+ CX |+ CY |+ CZ+ deriving (Read, Show, Eq)+ data Attribute = Attr [AChar] U+ data Schema = Sch [Attribute]+ append :: Schema -> Schema -> Schema+ append (Sch s1) (Sch s2) = Sch (s1 ++ s2)+ attrNotIn :: Attribute -> Schema -> Bool+ attrNotIn _ (Sch GHC.Types.[]) = True+ attrNotIn (Attr name u) (Sch (Attr name' _ GHC.Types.: t))+ = ((name /= name') && ((attrNotIn ((Attr name) u)) (Sch t)))+ disjoint :: Schema -> Schema -> Bool+ disjoint (Sch GHC.Types.[]) _ = True+ disjoint (Sch (h GHC.Types.: t)) s+ = (((attrNotIn h) s) && ((disjoint (Sch t)) s))+ occurs :: [AChar] -> Schema -> Bool+ occurs _ (Sch GHC.Types.[]) = False+ occurs name (Sch (Attr name' _ GHC.Types.: attrs))+ = ((name == name') || ((occurs name) (Sch attrs)))+ lookup :: [AChar] -> Schema -> U+ lookup _ (Sch GHC.Types.[]) = undefined+ lookup name (Sch (Attr name' u GHC.Types.: attrs))+ = if (name == name') then u else (lookup name) (Sch attrs)+ type family Equals_0123456789876543210 (a :: U) (b :: U) :: Bool where+ Equals_0123456789876543210 BOOL BOOL = TrueSym0+ Equals_0123456789876543210 STRING STRING = TrueSym0+ Equals_0123456789876543210 NAT NAT = TrueSym0+ Equals_0123456789876543210 (VEC a a) (VEC b b) = (:&&) ((:==) a b) ((:==) a b)+ Equals_0123456789876543210 (a :: U) (b :: U) = FalseSym0+ instance PEq U where+ type (:==) (a :: U) (b :: U) = Equals_0123456789876543210 a b+ type BOOLSym0 = BOOL+ type STRINGSym0 = STRING+ type NATSym0 = NAT+ type VECSym2 (t :: U) (t :: Nat) = VEC t t+ instance SuppressUnusedWarnings VECSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) VECSym1KindInference) GHC.Tuple.())+ data VECSym1 (l :: U) (l :: TyFun Nat U)+ = forall arg. SameKind (Apply (VECSym1 l) arg) (VECSym2 l arg) =>+ VECSym1KindInference+ type instance Apply (VECSym1 l) l = VEC l l+ instance SuppressUnusedWarnings VECSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) VECSym0KindInference) GHC.Tuple.())+ data VECSym0 (l :: TyFun U (TyFun Nat U -> Type))+ = forall arg. SameKind (Apply VECSym0 arg) (VECSym1 arg) =>+ VECSym0KindInference+ type instance Apply VECSym0 l = VECSym1 l+ type family Equals_0123456789876543210 (a :: AChar) (b :: AChar) :: Bool where+ Equals_0123456789876543210 CA CA = TrueSym0+ Equals_0123456789876543210 CB CB = TrueSym0+ Equals_0123456789876543210 CC CC = TrueSym0+ Equals_0123456789876543210 CD CD = TrueSym0+ Equals_0123456789876543210 CE CE = TrueSym0+ Equals_0123456789876543210 CF CF = TrueSym0+ Equals_0123456789876543210 CG CG = TrueSym0+ Equals_0123456789876543210 CH CH = TrueSym0+ Equals_0123456789876543210 CI CI = TrueSym0+ Equals_0123456789876543210 CJ CJ = TrueSym0+ Equals_0123456789876543210 CK CK = TrueSym0+ Equals_0123456789876543210 CL CL = TrueSym0+ Equals_0123456789876543210 CM CM = TrueSym0+ Equals_0123456789876543210 CN CN = TrueSym0+ Equals_0123456789876543210 CO CO = TrueSym0+ Equals_0123456789876543210 CP CP = TrueSym0+ Equals_0123456789876543210 CQ CQ = TrueSym0+ Equals_0123456789876543210 CR CR = TrueSym0+ Equals_0123456789876543210 CS CS = TrueSym0+ Equals_0123456789876543210 CT CT = TrueSym0+ Equals_0123456789876543210 CU CU = TrueSym0+ Equals_0123456789876543210 CV CV = TrueSym0+ Equals_0123456789876543210 CW CW = TrueSym0+ Equals_0123456789876543210 CX CX = TrueSym0+ Equals_0123456789876543210 CY CY = TrueSym0+ Equals_0123456789876543210 CZ CZ = TrueSym0+ Equals_0123456789876543210 (a :: AChar) (b :: AChar) = FalseSym0+ instance PEq AChar where+ type (:==) (a :: AChar) (b :: AChar) = Equals_0123456789876543210 a b+ type CASym0 = CA+ type CBSym0 = CB+ type CCSym0 = CC+ type CDSym0 = CD+ type CESym0 = CE+ type CFSym0 = CF+ type CGSym0 = CG+ type CHSym0 = CH+ type CISym0 = CI+ type CJSym0 = CJ+ type CKSym0 = CK+ type CLSym0 = CL+ type CMSym0 = CM+ type CNSym0 = CN+ type COSym0 = CO+ type CPSym0 = CP+ type CQSym0 = CQ+ type CRSym0 = CR+ type CSSym0 = CS+ type CTSym0 = CT+ type CUSym0 = CU+ type CVSym0 = CV+ type CWSym0 = CW+ type CXSym0 = CX+ type CYSym0 = CY+ type CZSym0 = CZ+ type AttrSym2 (t :: [AChar]) (t :: U) = Attr t t+ instance SuppressUnusedWarnings AttrSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) AttrSym1KindInference) GHC.Tuple.())+ data AttrSym1 (l :: [AChar]) (l :: TyFun U Attribute)+ = forall arg. SameKind (Apply (AttrSym1 l) arg) (AttrSym2 l arg) =>+ AttrSym1KindInference+ type instance Apply (AttrSym1 l) l = Attr l l+ instance SuppressUnusedWarnings AttrSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) AttrSym0KindInference) GHC.Tuple.())+ data AttrSym0 (l :: TyFun [AChar] (TyFun U Attribute -> Type))+ = forall arg. SameKind (Apply AttrSym0 arg) (AttrSym1 arg) =>+ AttrSym0KindInference+ type instance Apply AttrSym0 l = AttrSym1 l+ type SchSym1 (t :: [Attribute]) = Sch t+ instance SuppressUnusedWarnings SchSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) SchSym0KindInference) GHC.Tuple.())+ data SchSym0 (l :: TyFun [Attribute] Schema)+ = forall arg. SameKind (Apply SchSym0 arg) (SchSym1 arg) =>+ SchSym0KindInference+ type instance Apply SchSym0 l = Sch l+ type Let0123456789876543210Scrutinee_0123456789876543210Sym4 t t t t =+ Let0123456789876543210Scrutinee_0123456789876543210 t t t t+ instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym3 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210Scrutinee_0123456789876543210Sym3KindInference)+ GHC.Tuple.())+ data Let0123456789876543210Scrutinee_0123456789876543210Sym3 l l l l+ = forall arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym3 l l l) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym4 l l l arg) =>+ Let0123456789876543210Scrutinee_0123456789876543210Sym3KindInference+ type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym3 l l l) l = Let0123456789876543210Scrutinee_0123456789876543210 l l l l+ instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Let0123456789876543210Scrutinee_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 l l) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym3 l l arg) =>+ Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference+ type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 l l) l = Let0123456789876543210Scrutinee_0123456789876543210Sym3 l l l+ instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210Scrutinee_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 l) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym2 l arg) =>+ Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference+ type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 l) l = Let0123456789876543210Scrutinee_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210Scrutinee_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>+ Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference+ type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 l = Let0123456789876543210Scrutinee_0123456789876543210Sym1 l+ type family Let0123456789876543210Scrutinee_0123456789876543210 name name' u attrs where+ Let0123456789876543210Scrutinee_0123456789876543210 name name' u attrs = Apply (Apply (:==$) name) name'+ type family Case_0123456789876543210 name name' u attrs t where+ Case_0123456789876543210 name name' u attrs True = u+ Case_0123456789876543210 name name' u attrs False = Apply (Apply LookupSym0 name) (Apply SchSym0 attrs)+ type LookupSym2 (t :: [AChar]) (t :: Schema) = Lookup t t+ instance SuppressUnusedWarnings LookupSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) LookupSym1KindInference) GHC.Tuple.())+ data LookupSym1 (l :: [AChar]) (l :: TyFun Schema U)+ = forall arg. SameKind (Apply (LookupSym1 l) arg) (LookupSym2 l arg) =>+ LookupSym1KindInference+ type instance Apply (LookupSym1 l) l = Lookup l l+ instance SuppressUnusedWarnings LookupSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) LookupSym0KindInference) GHC.Tuple.())+ data LookupSym0 (l :: TyFun [AChar] (TyFun Schema U -> Type))+ = forall arg. SameKind (Apply LookupSym0 arg) (LookupSym1 arg) =>+ LookupSym0KindInference+ type instance Apply LookupSym0 l = LookupSym1 l+ type OccursSym2 (t :: [AChar]) (t :: Schema) = Occurs t t+ instance SuppressUnusedWarnings OccursSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) OccursSym1KindInference) GHC.Tuple.())+ data OccursSym1 (l :: [AChar]) (l :: TyFun Schema Bool)+ = forall arg. SameKind (Apply (OccursSym1 l) arg) (OccursSym2 l arg) =>+ OccursSym1KindInference+ type instance Apply (OccursSym1 l) l = Occurs l l+ instance SuppressUnusedWarnings OccursSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) OccursSym0KindInference) GHC.Tuple.())+ data OccursSym0 (l :: TyFun [AChar] (TyFun Schema Bool -> Type))+ = forall arg. SameKind (Apply OccursSym0 arg) (OccursSym1 arg) =>+ OccursSym0KindInference+ type instance Apply OccursSym0 l = OccursSym1 l+ type AttrNotInSym2 (t :: Attribute) (t :: Schema) = AttrNotIn t t+ instance SuppressUnusedWarnings AttrNotInSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) AttrNotInSym1KindInference) GHC.Tuple.())+ data AttrNotInSym1 (l :: Attribute) (l :: TyFun Schema Bool)+ = forall arg. SameKind (Apply (AttrNotInSym1 l) arg) (AttrNotInSym2 l arg) =>+ AttrNotInSym1KindInference+ type instance Apply (AttrNotInSym1 l) l = AttrNotIn l l+ instance SuppressUnusedWarnings AttrNotInSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) AttrNotInSym0KindInference) GHC.Tuple.())+ data AttrNotInSym0 (l :: TyFun Attribute (TyFun Schema Bool+ -> Type))+ = forall arg. SameKind (Apply AttrNotInSym0 arg) (AttrNotInSym1 arg) =>+ AttrNotInSym0KindInference+ type instance Apply AttrNotInSym0 l = AttrNotInSym1 l+ type DisjointSym2 (t :: Schema) (t :: Schema) = Disjoint t t+ instance SuppressUnusedWarnings DisjointSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) DisjointSym1KindInference) GHC.Tuple.())+ data DisjointSym1 (l :: Schema) (l :: TyFun Schema Bool)+ = forall arg. SameKind (Apply (DisjointSym1 l) arg) (DisjointSym2 l arg) =>+ DisjointSym1KindInference+ type instance Apply (DisjointSym1 l) l = Disjoint l l+ instance SuppressUnusedWarnings DisjointSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) DisjointSym0KindInference) GHC.Tuple.())+ data DisjointSym0 (l :: TyFun Schema (TyFun Schema Bool -> Type))+ = forall arg. SameKind (Apply DisjointSym0 arg) (DisjointSym1 arg) =>+ DisjointSym0KindInference+ type instance Apply DisjointSym0 l = DisjointSym1 l+ type AppendSym2 (t :: Schema) (t :: Schema) = Append t t+ instance SuppressUnusedWarnings AppendSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) AppendSym1KindInference) GHC.Tuple.())+ data AppendSym1 (l :: Schema) (l :: TyFun Schema Schema)+ = forall arg. SameKind (Apply (AppendSym1 l) arg) (AppendSym2 l arg) =>+ AppendSym1KindInference+ type instance Apply (AppendSym1 l) l = Append l l+ instance SuppressUnusedWarnings AppendSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) AppendSym0KindInference) GHC.Tuple.())+ data AppendSym0 (l :: TyFun Schema (TyFun Schema Schema -> Type))+ = forall arg. SameKind (Apply AppendSym0 arg) (AppendSym1 arg) =>+ AppendSym0KindInference+ type instance Apply AppendSym0 l = AppendSym1 l+ type family Lookup (a :: [AChar]) (a :: Schema) :: U where+ Lookup _z_0123456789876543210 (Sch '[]) = Any+ Lookup name (Sch ((:) (Attr name' u) attrs)) = Case_0123456789876543210 name name' u attrs (Let0123456789876543210Scrutinee_0123456789876543210Sym4 name name' u attrs)+ type family Occurs (a :: [AChar]) (a :: Schema) :: Bool where+ Occurs _z_0123456789876543210 (Sch '[]) = FalseSym0+ Occurs name (Sch ((:) (Attr name' _z_0123456789876543210) attrs)) = Apply (Apply (:||$) (Apply (Apply (:==$) name) name')) (Apply (Apply OccursSym0 name) (Apply SchSym0 attrs))+ type family AttrNotIn (a :: Attribute) (a :: Schema) :: Bool where+ AttrNotIn _z_0123456789876543210 (Sch '[]) = TrueSym0+ AttrNotIn (Attr name u) (Sch ((:) (Attr name' _z_0123456789876543210) t)) = Apply (Apply (:&&$) (Apply (Apply (:/=$) name) name')) (Apply (Apply AttrNotInSym0 (Apply (Apply AttrSym0 name) u)) (Apply SchSym0 t))+ type family Disjoint (a :: Schema) (a :: Schema) :: Bool where+ Disjoint (Sch '[]) _z_0123456789876543210 = TrueSym0+ Disjoint (Sch ((:) h t)) s = Apply (Apply (:&&$) (Apply (Apply AttrNotInSym0 h) s)) (Apply (Apply DisjointSym0 (Apply SchSym0 t)) s)+ type family Append (a :: Schema) (a :: Schema) :: Schema where+ Append (Sch s1) (Sch s2) = Apply SchSym0 (Apply (Apply (:++$) s1) s2)+ sLookup ::+ forall (t :: [AChar]) (t :: Schema).+ Sing t -> Sing t -> Sing (Apply (Apply LookupSym0 t) t :: U)+ sOccurs ::+ forall (t :: [AChar]) (t :: Schema).+ Sing t -> Sing t -> Sing (Apply (Apply OccursSym0 t) t :: Bool)+ sAttrNotIn ::+ forall (t :: Attribute) (t :: Schema).+ Sing t -> Sing t -> Sing (Apply (Apply AttrNotInSym0 t) t :: Bool)+ sDisjoint ::+ forall (t :: Schema) (t :: Schema).+ Sing t -> Sing t -> Sing (Apply (Apply DisjointSym0 t) t :: Bool)+ sAppend ::+ forall (t :: Schema) (t :: Schema).+ Sing t -> Sing t -> Sing (Apply (Apply AppendSym0 t) t :: Schema)+ sLookup _ (SSch SNil) = undefined+ sLookup+ (sName :: Sing name)+ (SSch (SCons (SAttr (sName' :: Sing name') (sU :: Sing u))+ (sAttrs :: Sing attrs)))+ = let+ sScrutinee_0123456789876543210 ::+ Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym4 name name' u attrs)+ sScrutinee_0123456789876543210+ = (applySing ((applySing ((singFun2 @(:==$)) (%:==))) sName))+ sName'+ in case sScrutinee_0123456789876543210 of+ STrue -> sU+ SFalse+ -> (applySing ((applySing ((singFun2 @LookupSym0) sLookup)) sName))+ ((applySing ((singFun1 @SchSym0) SSch)) sAttrs) ::+ Sing (Case_0123456789876543210 name name' u attrs (Let0123456789876543210Scrutinee_0123456789876543210Sym4 name name' u attrs) :: U)+ sOccurs _ (SSch SNil) = SFalse+ sOccurs+ (sName :: Sing name)+ (SSch (SCons (SAttr (sName' :: Sing name') _)+ (sAttrs :: Sing attrs)))+ = (applySing+ ((applySing ((singFun2 @(:||$)) (%:||)))+ ((applySing ((applySing ((singFun2 @(:==$)) (%:==))) sName))+ sName')))+ ((applySing ((applySing ((singFun2 @OccursSym0) sOccurs)) sName))+ ((applySing ((singFun1 @SchSym0) SSch)) sAttrs))+ sAttrNotIn _ (SSch SNil) = STrue+ sAttrNotIn+ (SAttr (sName :: Sing name) (sU :: Sing u))+ (SSch (SCons (SAttr (sName' :: Sing name') _) (sT :: Sing t)))+ = (applySing+ ((applySing ((singFun2 @(:&&$)) (%:&&)))+ ((applySing ((applySing ((singFun2 @(:/=$)) (%:/=))) sName))+ sName')))+ ((applySing+ ((applySing ((singFun2 @AttrNotInSym0) sAttrNotIn))+ ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sName)) sU)))+ ((applySing ((singFun1 @SchSym0) SSch)) sT))+ sDisjoint (SSch SNil) _ = STrue+ sDisjoint+ (SSch (SCons (sH :: Sing h) (sT :: Sing t)))+ (sS :: Sing s)+ = (applySing+ ((applySing ((singFun2 @(:&&$)) (%:&&)))+ ((applySing+ ((applySing ((singFun2 @AttrNotInSym0) sAttrNotIn)) sH))+ sS)))+ ((applySing+ ((applySing ((singFun2 @DisjointSym0) sDisjoint))+ ((applySing ((singFun1 @SchSym0) SSch)) sT)))+ sS)+ sAppend (SSch (sS1 :: Sing s1)) (SSch (sS2 :: Sing s2))+ = (applySing ((singFun1 @SchSym0) SSch))+ ((applySing ((applySing ((singFun2 @(:++$)) (%:++))) sS1)) sS2)+ data instance Sing (z :: U)+ = z ~ BOOL => SBOOL |+ z ~ STRING => SSTRING |+ z ~ NAT => SNAT |+ forall (n :: U) (n :: Nat). z ~ VEC n n =>+ SVEC (Sing (n :: U)) (Sing (n :: Nat))+ type SU = (Sing :: U -> Type)+ instance SingKind U where+ type Demote U = U+ fromSing SBOOL = BOOL+ fromSing SSTRING = STRING+ fromSing SNAT = NAT+ fromSing (SVEC b b) = (VEC (fromSing b)) (fromSing b)+ toSing BOOL = SomeSing SBOOL+ toSing STRING = SomeSing SSTRING+ toSing NAT = SomeSing SNAT+ toSing (VEC b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing U)) (toSing b :: SomeSing Nat)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing ((SVEC c) c) }+ instance SEq U where+ (%:==) SBOOL SBOOL = STrue+ (%:==) SBOOL SSTRING = SFalse+ (%:==) SBOOL SNAT = SFalse+ (%:==) SBOOL (SVEC _ _) = SFalse+ (%:==) SSTRING SBOOL = SFalse+ (%:==) SSTRING SSTRING = STrue+ (%:==) SSTRING SNAT = SFalse+ (%:==) SSTRING (SVEC _ _) = SFalse+ (%:==) SNAT SBOOL = SFalse+ (%:==) SNAT SSTRING = SFalse+ (%:==) SNAT SNAT = STrue+ (%:==) SNAT (SVEC _ _) = SFalse+ (%:==) (SVEC _ _) SBOOL = SFalse+ (%:==) (SVEC _ _) SSTRING = SFalse+ (%:==) (SVEC _ _) SNAT = SFalse+ (%:==) (SVEC a a) (SVEC b b)+ = ((%:&&) (((%:==) a) b)) (((%:==) a) b)+ instance SDecide U where+ (%~) SBOOL SBOOL = Proved Refl+ (%~) SBOOL SSTRING+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SBOOL SNAT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SBOOL (SVEC _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SSTRING SBOOL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SSTRING SSTRING = Proved Refl+ (%~) SSTRING SNAT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SSTRING (SVEC _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SNAT SBOOL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SNAT SSTRING+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SNAT SNAT = Proved Refl+ (%~) SNAT (SVEC _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SVEC _ _) SBOOL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SVEC _ _) SSTRING+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SVEC _ _) SNAT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SVEC a a) (SVEC b b)+ = case (GHC.Tuple.(,) (((%~) a) b)) (((%~) a) b) of+ GHC.Tuple.(,) (Proved Refl) (Proved Refl) -> Proved Refl+ GHC.Tuple.(,) (Disproved contra) _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,) _ (Disproved contra)+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ data instance Sing (z :: AChar)+ = z ~ CA => SCA |+ z ~ CB => SCB |+ z ~ CC => SCC |+ z ~ CD => SCD |+ z ~ CE => SCE |+ z ~ CF => SCF |+ z ~ CG => SCG |+ z ~ CH => SCH |+ z ~ CI => SCI |+ z ~ CJ => SCJ |+ z ~ CK => SCK |+ z ~ CL => SCL |+ z ~ CM => SCM |+ z ~ CN => SCN |+ z ~ CO => SCO |+ z ~ CP => SCP |+ z ~ CQ => SCQ |+ z ~ CR => SCR |+ z ~ CS => SCS |+ z ~ CT => SCT |+ z ~ CU => SCU |+ z ~ CV => SCV |+ z ~ CW => SCW |+ z ~ CX => SCX |+ z ~ CY => SCY |+ z ~ CZ => SCZ+ type SAChar = (Sing :: AChar -> Type)+ instance SingKind AChar where+ type Demote AChar = AChar+ fromSing SCA = CA+ fromSing SCB = CB+ fromSing SCC = CC+ fromSing SCD = CD+ fromSing SCE = CE+ fromSing SCF = CF+ fromSing SCG = CG+ fromSing SCH = CH+ fromSing SCI = CI+ fromSing SCJ = CJ+ fromSing SCK = CK+ fromSing SCL = CL+ fromSing SCM = CM+ fromSing SCN = CN+ fromSing SCO = CO+ fromSing SCP = CP+ fromSing SCQ = CQ+ fromSing SCR = CR+ fromSing SCS = CS+ fromSing SCT = CT+ fromSing SCU = CU+ fromSing SCV = CV+ fromSing SCW = CW+ fromSing SCX = CX+ fromSing SCY = CY+ fromSing SCZ = CZ+ toSing CA = SomeSing SCA+ toSing CB = SomeSing SCB+ toSing CC = SomeSing SCC+ toSing CD = SomeSing SCD+ toSing CE = SomeSing SCE+ toSing CF = SomeSing SCF+ toSing CG = SomeSing SCG+ toSing CH = SomeSing SCH+ toSing CI = SomeSing SCI+ toSing CJ = SomeSing SCJ+ toSing CK = SomeSing SCK+ toSing CL = SomeSing SCL+ toSing CM = SomeSing SCM+ toSing CN = SomeSing SCN+ toSing CO = SomeSing SCO+ toSing CP = SomeSing SCP+ toSing CQ = SomeSing SCQ+ toSing CR = SomeSing SCR+ toSing CS = SomeSing SCS+ toSing CT = SomeSing SCT+ toSing CU = SomeSing SCU+ toSing CV = SomeSing SCV+ toSing CW = SomeSing SCW+ toSing CX = SomeSing SCX+ toSing CY = SomeSing SCY+ toSing CZ = SomeSing SCZ+ instance SEq AChar where+ (%:==) SCA SCA = STrue+ (%:==) SCA SCB = SFalse+ (%:==) SCA SCC = SFalse+ (%:==) SCA SCD = SFalse+ (%:==) SCA SCE = SFalse+ (%:==) SCA SCF = SFalse+ (%:==) SCA SCG = SFalse+ (%:==) SCA SCH = SFalse+ (%:==) SCA SCI = SFalse+ (%:==) SCA SCJ = SFalse+ (%:==) SCA SCK = SFalse+ (%:==) SCA SCL = SFalse+ (%:==) SCA SCM = SFalse+ (%:==) SCA SCN = SFalse+ (%:==) SCA SCO = SFalse+ (%:==) SCA SCP = SFalse+ (%:==) SCA SCQ = SFalse+ (%:==) SCA SCR = SFalse+ (%:==) SCA SCS = SFalse+ (%:==) SCA SCT = SFalse+ (%:==) SCA SCU = SFalse+ (%:==) SCA SCV = SFalse+ (%:==) SCA SCW = SFalse+ (%:==) SCA SCX = SFalse+ (%:==) SCA SCY = SFalse+ (%:==) SCA SCZ = SFalse+ (%:==) SCB SCA = SFalse+ (%:==) SCB SCB = STrue+ (%:==) SCB SCC = SFalse+ (%:==) SCB SCD = SFalse+ (%:==) SCB SCE = SFalse+ (%:==) SCB SCF = SFalse+ (%:==) SCB SCG = SFalse+ (%:==) SCB SCH = SFalse+ (%:==) SCB SCI = SFalse+ (%:==) SCB SCJ = SFalse+ (%:==) SCB SCK = SFalse+ (%:==) SCB SCL = SFalse+ (%:==) SCB SCM = SFalse+ (%:==) SCB SCN = SFalse+ (%:==) SCB SCO = SFalse+ (%:==) SCB SCP = SFalse+ (%:==) SCB SCQ = SFalse+ (%:==) SCB SCR = SFalse+ (%:==) SCB SCS = SFalse+ (%:==) SCB SCT = SFalse+ (%:==) SCB SCU = SFalse+ (%:==) SCB SCV = SFalse+ (%:==) SCB SCW = SFalse+ (%:==) SCB SCX = SFalse+ (%:==) SCB SCY = SFalse+ (%:==) SCB SCZ = SFalse+ (%:==) SCC SCA = SFalse+ (%:==) SCC SCB = SFalse+ (%:==) SCC SCC = STrue+ (%:==) SCC SCD = SFalse+ (%:==) SCC SCE = SFalse+ (%:==) SCC SCF = SFalse+ (%:==) SCC SCG = SFalse+ (%:==) SCC SCH = SFalse+ (%:==) SCC SCI = SFalse+ (%:==) SCC SCJ = SFalse+ (%:==) SCC SCK = SFalse+ (%:==) SCC SCL = SFalse+ (%:==) SCC SCM = SFalse+ (%:==) SCC SCN = SFalse+ (%:==) SCC SCO = SFalse+ (%:==) SCC SCP = SFalse+ (%:==) SCC SCQ = SFalse+ (%:==) SCC SCR = SFalse+ (%:==) SCC SCS = SFalse+ (%:==) SCC SCT = SFalse+ (%:==) SCC SCU = SFalse+ (%:==) SCC SCV = SFalse+ (%:==) SCC SCW = SFalse+ (%:==) SCC SCX = SFalse+ (%:==) SCC SCY = SFalse+ (%:==) SCC SCZ = SFalse+ (%:==) SCD SCA = SFalse+ (%:==) SCD SCB = SFalse+ (%:==) SCD SCC = SFalse+ (%:==) SCD SCD = STrue+ (%:==) SCD SCE = SFalse+ (%:==) SCD SCF = SFalse+ (%:==) SCD SCG = SFalse+ (%:==) SCD SCH = SFalse+ (%:==) SCD SCI = SFalse+ (%:==) SCD SCJ = SFalse+ (%:==) SCD SCK = SFalse+ (%:==) SCD SCL = SFalse+ (%:==) SCD SCM = SFalse+ (%:==) SCD SCN = SFalse+ (%:==) SCD SCO = SFalse+ (%:==) SCD SCP = SFalse+ (%:==) SCD SCQ = SFalse+ (%:==) SCD SCR = SFalse+ (%:==) SCD SCS = SFalse+ (%:==) SCD SCT = SFalse+ (%:==) SCD SCU = SFalse+ (%:==) SCD SCV = SFalse+ (%:==) SCD SCW = SFalse+ (%:==) SCD SCX = SFalse+ (%:==) SCD SCY = SFalse+ (%:==) SCD SCZ = SFalse+ (%:==) SCE SCA = SFalse+ (%:==) SCE SCB = SFalse+ (%:==) SCE SCC = SFalse+ (%:==) SCE SCD = SFalse+ (%:==) SCE SCE = STrue+ (%:==) SCE SCF = SFalse+ (%:==) SCE SCG = SFalse+ (%:==) SCE SCH = SFalse+ (%:==) SCE SCI = SFalse+ (%:==) SCE SCJ = SFalse+ (%:==) SCE SCK = SFalse+ (%:==) SCE SCL = SFalse+ (%:==) SCE SCM = SFalse+ (%:==) SCE SCN = SFalse+ (%:==) SCE SCO = SFalse+ (%:==) SCE SCP = SFalse+ (%:==) SCE SCQ = SFalse+ (%:==) SCE SCR = SFalse+ (%:==) SCE SCS = SFalse+ (%:==) SCE SCT = SFalse+ (%:==) SCE SCU = SFalse+ (%:==) SCE SCV = SFalse+ (%:==) SCE SCW = SFalse+ (%:==) SCE SCX = SFalse+ (%:==) SCE SCY = SFalse+ (%:==) SCE SCZ = SFalse+ (%:==) SCF SCA = SFalse+ (%:==) SCF SCB = SFalse+ (%:==) SCF SCC = SFalse+ (%:==) SCF SCD = SFalse+ (%:==) SCF SCE = SFalse+ (%:==) SCF SCF = STrue+ (%:==) SCF SCG = SFalse+ (%:==) SCF SCH = SFalse+ (%:==) SCF SCI = SFalse+ (%:==) SCF SCJ = SFalse+ (%:==) SCF SCK = SFalse+ (%:==) SCF SCL = SFalse+ (%:==) SCF SCM = SFalse+ (%:==) SCF SCN = SFalse+ (%:==) SCF SCO = SFalse+ (%:==) SCF SCP = SFalse+ (%:==) SCF SCQ = SFalse+ (%:==) SCF SCR = SFalse+ (%:==) SCF SCS = SFalse+ (%:==) SCF SCT = SFalse+ (%:==) SCF SCU = SFalse+ (%:==) SCF SCV = SFalse+ (%:==) SCF SCW = SFalse+ (%:==) SCF SCX = SFalse+ (%:==) SCF SCY = SFalse+ (%:==) SCF SCZ = SFalse+ (%:==) SCG SCA = SFalse+ (%:==) SCG SCB = SFalse+ (%:==) SCG SCC = SFalse+ (%:==) SCG SCD = SFalse+ (%:==) SCG SCE = SFalse+ (%:==) SCG SCF = SFalse+ (%:==) SCG SCG = STrue+ (%:==) SCG SCH = SFalse+ (%:==) SCG SCI = SFalse+ (%:==) SCG SCJ = SFalse+ (%:==) SCG SCK = SFalse+ (%:==) SCG SCL = SFalse+ (%:==) SCG SCM = SFalse+ (%:==) SCG SCN = SFalse+ (%:==) SCG SCO = SFalse+ (%:==) SCG SCP = SFalse+ (%:==) SCG SCQ = SFalse+ (%:==) SCG SCR = SFalse+ (%:==) SCG SCS = SFalse+ (%:==) SCG SCT = SFalse+ (%:==) SCG SCU = SFalse+ (%:==) SCG SCV = SFalse+ (%:==) SCG SCW = SFalse+ (%:==) SCG SCX = SFalse+ (%:==) SCG SCY = SFalse+ (%:==) SCG SCZ = SFalse+ (%:==) SCH SCA = SFalse+ (%:==) SCH SCB = SFalse+ (%:==) SCH SCC = SFalse+ (%:==) SCH SCD = SFalse+ (%:==) SCH SCE = SFalse+ (%:==) SCH SCF = SFalse+ (%:==) SCH SCG = SFalse+ (%:==) SCH SCH = STrue+ (%:==) SCH SCI = SFalse+ (%:==) SCH SCJ = SFalse+ (%:==) SCH SCK = SFalse+ (%:==) SCH SCL = SFalse+ (%:==) SCH SCM = SFalse+ (%:==) SCH SCN = SFalse+ (%:==) SCH SCO = SFalse+ (%:==) SCH SCP = SFalse+ (%:==) SCH SCQ = SFalse+ (%:==) SCH SCR = SFalse+ (%:==) SCH SCS = SFalse+ (%:==) SCH SCT = SFalse+ (%:==) SCH SCU = SFalse+ (%:==) SCH SCV = SFalse+ (%:==) SCH SCW = SFalse+ (%:==) SCH SCX = SFalse+ (%:==) SCH SCY = SFalse+ (%:==) SCH SCZ = SFalse+ (%:==) SCI SCA = SFalse+ (%:==) SCI SCB = SFalse+ (%:==) SCI SCC = SFalse+ (%:==) SCI SCD = SFalse+ (%:==) SCI SCE = SFalse+ (%:==) SCI SCF = SFalse+ (%:==) SCI SCG = SFalse+ (%:==) SCI SCH = SFalse+ (%:==) SCI SCI = STrue+ (%:==) SCI SCJ = SFalse+ (%:==) SCI SCK = SFalse+ (%:==) SCI SCL = SFalse+ (%:==) SCI SCM = SFalse+ (%:==) SCI SCN = SFalse+ (%:==) SCI SCO = SFalse+ (%:==) SCI SCP = SFalse+ (%:==) SCI SCQ = SFalse+ (%:==) SCI SCR = SFalse+ (%:==) SCI SCS = SFalse+ (%:==) SCI SCT = SFalse+ (%:==) SCI SCU = SFalse+ (%:==) SCI SCV = SFalse+ (%:==) SCI SCW = SFalse+ (%:==) SCI SCX = SFalse+ (%:==) SCI SCY = SFalse+ (%:==) SCI SCZ = SFalse+ (%:==) SCJ SCA = SFalse+ (%:==) SCJ SCB = SFalse+ (%:==) SCJ SCC = SFalse+ (%:==) SCJ SCD = SFalse+ (%:==) SCJ SCE = SFalse+ (%:==) SCJ SCF = SFalse+ (%:==) SCJ SCG = SFalse+ (%:==) SCJ SCH = SFalse+ (%:==) SCJ SCI = SFalse+ (%:==) SCJ SCJ = STrue+ (%:==) SCJ SCK = SFalse+ (%:==) SCJ SCL = SFalse+ (%:==) SCJ SCM = SFalse+ (%:==) SCJ SCN = SFalse+ (%:==) SCJ SCO = SFalse+ (%:==) SCJ SCP = SFalse+ (%:==) SCJ SCQ = SFalse+ (%:==) SCJ SCR = SFalse+ (%:==) SCJ SCS = SFalse+ (%:==) SCJ SCT = SFalse+ (%:==) SCJ SCU = SFalse+ (%:==) SCJ SCV = SFalse+ (%:==) SCJ SCW = SFalse+ (%:==) SCJ SCX = SFalse+ (%:==) SCJ SCY = SFalse+ (%:==) SCJ SCZ = SFalse+ (%:==) SCK SCA = SFalse+ (%:==) SCK SCB = SFalse+ (%:==) SCK SCC = SFalse+ (%:==) SCK SCD = SFalse+ (%:==) SCK SCE = SFalse+ (%:==) SCK SCF = SFalse+ (%:==) SCK SCG = SFalse+ (%:==) SCK SCH = SFalse+ (%:==) SCK SCI = SFalse+ (%:==) SCK SCJ = SFalse+ (%:==) SCK SCK = STrue+ (%:==) SCK SCL = SFalse+ (%:==) SCK SCM = SFalse+ (%:==) SCK SCN = SFalse+ (%:==) SCK SCO = SFalse+ (%:==) SCK SCP = SFalse+ (%:==) SCK SCQ = SFalse+ (%:==) SCK SCR = SFalse+ (%:==) SCK SCS = SFalse+ (%:==) SCK SCT = SFalse+ (%:==) SCK SCU = SFalse+ (%:==) SCK SCV = SFalse+ (%:==) SCK SCW = SFalse+ (%:==) SCK SCX = SFalse+ (%:==) SCK SCY = SFalse+ (%:==) SCK SCZ = SFalse+ (%:==) SCL SCA = SFalse+ (%:==) SCL SCB = SFalse+ (%:==) SCL SCC = SFalse+ (%:==) SCL SCD = SFalse+ (%:==) SCL SCE = SFalse+ (%:==) SCL SCF = SFalse+ (%:==) SCL SCG = SFalse+ (%:==) SCL SCH = SFalse+ (%:==) SCL SCI = SFalse+ (%:==) SCL SCJ = SFalse+ (%:==) SCL SCK = SFalse+ (%:==) SCL SCL = STrue+ (%:==) SCL SCM = SFalse+ (%:==) SCL SCN = SFalse+ (%:==) SCL SCO = SFalse+ (%:==) SCL SCP = SFalse+ (%:==) SCL SCQ = SFalse+ (%:==) SCL SCR = SFalse+ (%:==) SCL SCS = SFalse+ (%:==) SCL SCT = SFalse+ (%:==) SCL SCU = SFalse+ (%:==) SCL SCV = SFalse+ (%:==) SCL SCW = SFalse+ (%:==) SCL SCX = SFalse+ (%:==) SCL SCY = SFalse+ (%:==) SCL SCZ = SFalse+ (%:==) SCM SCA = SFalse+ (%:==) SCM SCB = SFalse+ (%:==) SCM SCC = SFalse+ (%:==) SCM SCD = SFalse+ (%:==) SCM SCE = SFalse+ (%:==) SCM SCF = SFalse+ (%:==) SCM SCG = SFalse+ (%:==) SCM SCH = SFalse+ (%:==) SCM SCI = SFalse+ (%:==) SCM SCJ = SFalse+ (%:==) SCM SCK = SFalse+ (%:==) SCM SCL = SFalse+ (%:==) SCM SCM = STrue+ (%:==) SCM SCN = SFalse+ (%:==) SCM SCO = SFalse+ (%:==) SCM SCP = SFalse+ (%:==) SCM SCQ = SFalse+ (%:==) SCM SCR = SFalse+ (%:==) SCM SCS = SFalse+ (%:==) SCM SCT = SFalse+ (%:==) SCM SCU = SFalse+ (%:==) SCM SCV = SFalse+ (%:==) SCM SCW = SFalse+ (%:==) SCM SCX = SFalse+ (%:==) SCM SCY = SFalse+ (%:==) SCM SCZ = SFalse+ (%:==) SCN SCA = SFalse+ (%:==) SCN SCB = SFalse+ (%:==) SCN SCC = SFalse+ (%:==) SCN SCD = SFalse+ (%:==) SCN SCE = SFalse+ (%:==) SCN SCF = SFalse+ (%:==) SCN SCG = SFalse+ (%:==) SCN SCH = SFalse+ (%:==) SCN SCI = SFalse+ (%:==) SCN SCJ = SFalse+ (%:==) SCN SCK = SFalse+ (%:==) SCN SCL = SFalse+ (%:==) SCN SCM = SFalse+ (%:==) SCN SCN = STrue+ (%:==) SCN SCO = SFalse+ (%:==) SCN SCP = SFalse+ (%:==) SCN SCQ = SFalse+ (%:==) SCN SCR = SFalse+ (%:==) SCN SCS = SFalse+ (%:==) SCN SCT = SFalse+ (%:==) SCN SCU = SFalse+ (%:==) SCN SCV = SFalse+ (%:==) SCN SCW = SFalse+ (%:==) SCN SCX = SFalse+ (%:==) SCN SCY = SFalse+ (%:==) SCN SCZ = SFalse+ (%:==) SCO SCA = SFalse+ (%:==) SCO SCB = SFalse+ (%:==) SCO SCC = SFalse+ (%:==) SCO SCD = SFalse+ (%:==) SCO SCE = SFalse+ (%:==) SCO SCF = SFalse+ (%:==) SCO SCG = SFalse+ (%:==) SCO SCH = SFalse+ (%:==) SCO SCI = SFalse+ (%:==) SCO SCJ = SFalse+ (%:==) SCO SCK = SFalse+ (%:==) SCO SCL = SFalse+ (%:==) SCO SCM = SFalse+ (%:==) SCO SCN = SFalse+ (%:==) SCO SCO = STrue+ (%:==) SCO SCP = SFalse+ (%:==) SCO SCQ = SFalse+ (%:==) SCO SCR = SFalse+ (%:==) SCO SCS = SFalse+ (%:==) SCO SCT = SFalse+ (%:==) SCO SCU = SFalse+ (%:==) SCO SCV = SFalse+ (%:==) SCO SCW = SFalse+ (%:==) SCO SCX = SFalse+ (%:==) SCO SCY = SFalse+ (%:==) SCO SCZ = SFalse+ (%:==) SCP SCA = SFalse+ (%:==) SCP SCB = SFalse+ (%:==) SCP SCC = SFalse+ (%:==) SCP SCD = SFalse+ (%:==) SCP SCE = SFalse+ (%:==) SCP SCF = SFalse+ (%:==) SCP SCG = SFalse+ (%:==) SCP SCH = SFalse+ (%:==) SCP SCI = SFalse+ (%:==) SCP SCJ = SFalse+ (%:==) SCP SCK = SFalse+ (%:==) SCP SCL = SFalse+ (%:==) SCP SCM = SFalse+ (%:==) SCP SCN = SFalse+ (%:==) SCP SCO = SFalse+ (%:==) SCP SCP = STrue+ (%:==) SCP SCQ = SFalse+ (%:==) SCP SCR = SFalse+ (%:==) SCP SCS = SFalse+ (%:==) SCP SCT = SFalse+ (%:==) SCP SCU = SFalse+ (%:==) SCP SCV = SFalse+ (%:==) SCP SCW = SFalse+ (%:==) SCP SCX = SFalse+ (%:==) SCP SCY = SFalse+ (%:==) SCP SCZ = SFalse+ (%:==) SCQ SCA = SFalse+ (%:==) SCQ SCB = SFalse+ (%:==) SCQ SCC = SFalse+ (%:==) SCQ SCD = SFalse+ (%:==) SCQ SCE = SFalse+ (%:==) SCQ SCF = SFalse+ (%:==) SCQ SCG = SFalse+ (%:==) SCQ SCH = SFalse+ (%:==) SCQ SCI = SFalse+ (%:==) SCQ SCJ = SFalse+ (%:==) SCQ SCK = SFalse+ (%:==) SCQ SCL = SFalse+ (%:==) SCQ SCM = SFalse+ (%:==) SCQ SCN = SFalse+ (%:==) SCQ SCO = SFalse+ (%:==) SCQ SCP = SFalse+ (%:==) SCQ SCQ = STrue+ (%:==) SCQ SCR = SFalse+ (%:==) SCQ SCS = SFalse+ (%:==) SCQ SCT = SFalse+ (%:==) SCQ SCU = SFalse+ (%:==) SCQ SCV = SFalse+ (%:==) SCQ SCW = SFalse+ (%:==) SCQ SCX = SFalse+ (%:==) SCQ SCY = SFalse+ (%:==) SCQ SCZ = SFalse+ (%:==) SCR SCA = SFalse+ (%:==) SCR SCB = SFalse+ (%:==) SCR SCC = SFalse+ (%:==) SCR SCD = SFalse+ (%:==) SCR SCE = SFalse+ (%:==) SCR SCF = SFalse+ (%:==) SCR SCG = SFalse+ (%:==) SCR SCH = SFalse+ (%:==) SCR SCI = SFalse+ (%:==) SCR SCJ = SFalse+ (%:==) SCR SCK = SFalse+ (%:==) SCR SCL = SFalse+ (%:==) SCR SCM = SFalse+ (%:==) SCR SCN = SFalse+ (%:==) SCR SCO = SFalse+ (%:==) SCR SCP = SFalse+ (%:==) SCR SCQ = SFalse+ (%:==) SCR SCR = STrue+ (%:==) SCR SCS = SFalse+ (%:==) SCR SCT = SFalse+ (%:==) SCR SCU = SFalse+ (%:==) SCR SCV = SFalse+ (%:==) SCR SCW = SFalse+ (%:==) SCR SCX = SFalse+ (%:==) SCR SCY = SFalse+ (%:==) SCR SCZ = SFalse+ (%:==) SCS SCA = SFalse+ (%:==) SCS SCB = SFalse+ (%:==) SCS SCC = SFalse+ (%:==) SCS SCD = SFalse+ (%:==) SCS SCE = SFalse+ (%:==) SCS SCF = SFalse+ (%:==) SCS SCG = SFalse+ (%:==) SCS SCH = SFalse+ (%:==) SCS SCI = SFalse+ (%:==) SCS SCJ = SFalse+ (%:==) SCS SCK = SFalse+ (%:==) SCS SCL = SFalse+ (%:==) SCS SCM = SFalse+ (%:==) SCS SCN = SFalse+ (%:==) SCS SCO = SFalse+ (%:==) SCS SCP = SFalse+ (%:==) SCS SCQ = SFalse+ (%:==) SCS SCR = SFalse+ (%:==) SCS SCS = STrue+ (%:==) SCS SCT = SFalse+ (%:==) SCS SCU = SFalse+ (%:==) SCS SCV = SFalse+ (%:==) SCS SCW = SFalse+ (%:==) SCS SCX = SFalse+ (%:==) SCS SCY = SFalse+ (%:==) SCS SCZ = SFalse+ (%:==) SCT SCA = SFalse+ (%:==) SCT SCB = SFalse+ (%:==) SCT SCC = SFalse+ (%:==) SCT SCD = SFalse+ (%:==) SCT SCE = SFalse+ (%:==) SCT SCF = SFalse+ (%:==) SCT SCG = SFalse+ (%:==) SCT SCH = SFalse+ (%:==) SCT SCI = SFalse+ (%:==) SCT SCJ = SFalse+ (%:==) SCT SCK = SFalse+ (%:==) SCT SCL = SFalse+ (%:==) SCT SCM = SFalse+ (%:==) SCT SCN = SFalse+ (%:==) SCT SCO = SFalse+ (%:==) SCT SCP = SFalse+ (%:==) SCT SCQ = SFalse+ (%:==) SCT SCR = SFalse+ (%:==) SCT SCS = SFalse+ (%:==) SCT SCT = STrue+ (%:==) SCT SCU = SFalse+ (%:==) SCT SCV = SFalse+ (%:==) SCT SCW = SFalse+ (%:==) SCT SCX = SFalse+ (%:==) SCT SCY = SFalse+ (%:==) SCT SCZ = SFalse+ (%:==) SCU SCA = SFalse+ (%:==) SCU SCB = SFalse+ (%:==) SCU SCC = SFalse+ (%:==) SCU SCD = SFalse+ (%:==) SCU SCE = SFalse+ (%:==) SCU SCF = SFalse+ (%:==) SCU SCG = SFalse+ (%:==) SCU SCH = SFalse+ (%:==) SCU SCI = SFalse+ (%:==) SCU SCJ = SFalse+ (%:==) SCU SCK = SFalse+ (%:==) SCU SCL = SFalse+ (%:==) SCU SCM = SFalse+ (%:==) SCU SCN = SFalse+ (%:==) SCU SCO = SFalse+ (%:==) SCU SCP = SFalse+ (%:==) SCU SCQ = SFalse+ (%:==) SCU SCR = SFalse+ (%:==) SCU SCS = SFalse+ (%:==) SCU SCT = SFalse+ (%:==) SCU SCU = STrue+ (%:==) SCU SCV = SFalse+ (%:==) SCU SCW = SFalse+ (%:==) SCU SCX = SFalse+ (%:==) SCU SCY = SFalse+ (%:==) SCU SCZ = SFalse+ (%:==) SCV SCA = SFalse+ (%:==) SCV SCB = SFalse+ (%:==) SCV SCC = SFalse+ (%:==) SCV SCD = SFalse+ (%:==) SCV SCE = SFalse+ (%:==) SCV SCF = SFalse+ (%:==) SCV SCG = SFalse+ (%:==) SCV SCH = SFalse+ (%:==) SCV SCI = SFalse+ (%:==) SCV SCJ = SFalse+ (%:==) SCV SCK = SFalse+ (%:==) SCV SCL = SFalse+ (%:==) SCV SCM = SFalse+ (%:==) SCV SCN = SFalse+ (%:==) SCV SCO = SFalse+ (%:==) SCV SCP = SFalse+ (%:==) SCV SCQ = SFalse+ (%:==) SCV SCR = SFalse+ (%:==) SCV SCS = SFalse+ (%:==) SCV SCT = SFalse+ (%:==) SCV SCU = SFalse+ (%:==) SCV SCV = STrue+ (%:==) SCV SCW = SFalse+ (%:==) SCV SCX = SFalse+ (%:==) SCV SCY = SFalse+ (%:==) SCV SCZ = SFalse+ (%:==) SCW SCA = SFalse+ (%:==) SCW SCB = SFalse+ (%:==) SCW SCC = SFalse+ (%:==) SCW SCD = SFalse+ (%:==) SCW SCE = SFalse+ (%:==) SCW SCF = SFalse+ (%:==) SCW SCG = SFalse+ (%:==) SCW SCH = SFalse+ (%:==) SCW SCI = SFalse+ (%:==) SCW SCJ = SFalse+ (%:==) SCW SCK = SFalse+ (%:==) SCW SCL = SFalse+ (%:==) SCW SCM = SFalse+ (%:==) SCW SCN = SFalse+ (%:==) SCW SCO = SFalse+ (%:==) SCW SCP = SFalse+ (%:==) SCW SCQ = SFalse+ (%:==) SCW SCR = SFalse+ (%:==) SCW SCS = SFalse+ (%:==) SCW SCT = SFalse+ (%:==) SCW SCU = SFalse+ (%:==) SCW SCV = SFalse+ (%:==) SCW SCW = STrue+ (%:==) SCW SCX = SFalse+ (%:==) SCW SCY = SFalse+ (%:==) SCW SCZ = SFalse+ (%:==) SCX SCA = SFalse+ (%:==) SCX SCB = SFalse+ (%:==) SCX SCC = SFalse+ (%:==) SCX SCD = SFalse+ (%:==) SCX SCE = SFalse+ (%:==) SCX SCF = SFalse+ (%:==) SCX SCG = SFalse+ (%:==) SCX SCH = SFalse+ (%:==) SCX SCI = SFalse+ (%:==) SCX SCJ = SFalse+ (%:==) SCX SCK = SFalse+ (%:==) SCX SCL = SFalse+ (%:==) SCX SCM = SFalse+ (%:==) SCX SCN = SFalse+ (%:==) SCX SCO = SFalse+ (%:==) SCX SCP = SFalse+ (%:==) SCX SCQ = SFalse+ (%:==) SCX SCR = SFalse+ (%:==) SCX SCS = SFalse+ (%:==) SCX SCT = SFalse+ (%:==) SCX SCU = SFalse+ (%:==) SCX SCV = SFalse+ (%:==) SCX SCW = SFalse+ (%:==) SCX SCX = STrue+ (%:==) SCX SCY = SFalse+ (%:==) SCX SCZ = SFalse+ (%:==) SCY SCA = SFalse+ (%:==) SCY SCB = SFalse+ (%:==) SCY SCC = SFalse+ (%:==) SCY SCD = SFalse+ (%:==) SCY SCE = SFalse+ (%:==) SCY SCF = SFalse+ (%:==) SCY SCG = SFalse+ (%:==) SCY SCH = SFalse+ (%:==) SCY SCI = SFalse+ (%:==) SCY SCJ = SFalse+ (%:==) SCY SCK = SFalse+ (%:==) SCY SCL = SFalse+ (%:==) SCY SCM = SFalse+ (%:==) SCY SCN = SFalse+ (%:==) SCY SCO = SFalse+ (%:==) SCY SCP = SFalse+ (%:==) SCY SCQ = SFalse+ (%:==) SCY SCR = SFalse+ (%:==) SCY SCS = SFalse+ (%:==) SCY SCT = SFalse+ (%:==) SCY SCU = SFalse+ (%:==) SCY SCV = SFalse+ (%:==) SCY SCW = SFalse+ (%:==) SCY SCX = SFalse+ (%:==) SCY SCY = STrue+ (%:==) SCY SCZ = SFalse+ (%:==) SCZ SCA = SFalse+ (%:==) SCZ SCB = SFalse+ (%:==) SCZ SCC = SFalse+ (%:==) SCZ SCD = SFalse+ (%:==) SCZ SCE = SFalse+ (%:==) SCZ SCF = SFalse+ (%:==) SCZ SCG = SFalse+ (%:==) SCZ SCH = SFalse+ (%:==) SCZ SCI = SFalse+ (%:==) SCZ SCJ = SFalse+ (%:==) SCZ SCK = SFalse+ (%:==) SCZ SCL = SFalse+ (%:==) SCZ SCM = SFalse+ (%:==) SCZ SCN = SFalse+ (%:==) SCZ SCO = SFalse+ (%:==) SCZ SCP = SFalse+ (%:==) SCZ SCQ = SFalse+ (%:==) SCZ SCR = SFalse+ (%:==) SCZ SCS = SFalse+ (%:==) SCZ SCT = SFalse+ (%:==) SCZ SCU = SFalse+ (%:==) SCZ SCV = SFalse+ (%:==) SCZ SCW = SFalse+ (%:==) SCZ SCX = SFalse+ (%:==) SCZ SCY = SFalse+ (%:==) SCZ SCZ = STrue+ instance SDecide AChar where+ (%~) SCA SCA = Proved Refl+ (%~) SCA SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCA SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCB = Proved Refl+ (%~) SCB SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCB SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCC = Proved Refl+ (%~) SCC SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCC SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCD = Proved Refl+ (%~) SCD SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCD SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCE = Proved Refl+ (%~) SCE SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCE SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCF = Proved Refl+ (%~) SCF SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCF SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCG = Proved Refl+ (%~) SCG SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCG SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCH = Proved Refl+ (%~) SCH SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCH SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCI = Proved Refl+ (%~) SCI SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCI SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCJ = Proved Refl+ (%~) SCJ SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCJ SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCK = Proved Refl+ (%~) SCK SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCK SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCL = Proved Refl+ (%~) SCL SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCL SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCM = Proved Refl+ (%~) SCM SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCM SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCN = Proved Refl+ (%~) SCN SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCN SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCO = Proved Refl+ (%~) SCO SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCO SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCP = Proved Refl+ (%~) SCP SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCP SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCQ = Proved Refl+ (%~) SCQ SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCQ SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCR = Proved Refl+ (%~) SCR SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCR SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCS = Proved Refl+ (%~) SCS SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCS SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCT = Proved Refl+ (%~) SCT SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCT SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCU = Proved Refl+ (%~) SCU SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCU SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCV = Proved Refl+ (%~) SCV SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCV SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCW = Proved Refl+ (%~) SCW SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCW SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCX = Proved Refl+ (%~) SCX SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCX SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCY SCY = Proved Refl+ (%~) SCY SCZ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCA+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCB+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCC+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCD+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCE+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCF+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCG+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCH+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCI+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCJ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCK+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCL+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCM+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCN+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCO+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCP+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCQ+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCR+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCS+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCT+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCU+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCV+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCW+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCX+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCY+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SCZ SCZ = Proved Refl+ data instance Sing (z :: Attribute)+ = forall (n :: [AChar]) (n :: U). z ~ Attr n n =>+ SAttr (Sing (n :: [AChar])) (Sing (n :: U))+ type SAttribute = (Sing :: Attribute -> Type)+ instance SingKind Attribute where+ type Demote Attribute = Attribute+ fromSing (SAttr b b) = (Attr (fromSing b)) (fromSing b)+ toSing (Attr b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing [AChar]))+ (toSing b :: SomeSing U)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing ((SAttr c) c) }+ data instance Sing (z :: Schema)+ = forall (n :: [Attribute]). z ~ Sch n =>+ SSch (Sing (n :: [Attribute]))+ type SSchema = (Sing :: Schema -> Type)+ instance SingKind Schema where+ type Demote Schema = Schema+ fromSing (SSch b) = Sch (fromSing b)+ toSing (Sch b)+ = case toSing b :: SomeSing [Attribute] of {+ SomeSing c -> SomeSing (SSch c) }+ instance SingI BOOL where+ sing = SBOOL+ instance SingI STRING where+ sing = SSTRING+ instance SingI NAT where+ sing = SNAT+ instance (SingI n, SingI n) =>+ SingI (VEC (n :: U) (n :: Nat)) where+ sing = (SVEC sing) sing+ instance SingI CA where+ sing = SCA+ instance SingI CB where+ sing = SCB+ instance SingI CC where+ sing = SCC+ instance SingI CD where+ sing = SCD+ instance SingI CE where+ sing = SCE+ instance SingI CF where+ sing = SCF+ instance SingI CG where+ sing = SCG+ instance SingI CH where+ sing = SCH+ instance SingI CI where+ sing = SCI+ instance SingI CJ where+ sing = SCJ+ instance SingI CK where+ sing = SCK+ instance SingI CL where+ sing = SCL+ instance SingI CM where+ sing = SCM+ instance SingI CN where+ sing = SCN+ instance SingI CO where+ sing = SCO+ instance SingI CP where+ sing = SCP+ instance SingI CQ where+ sing = SCQ+ instance SingI CR where+ sing = SCR+ instance SingI CS where+ sing = SCS+ instance SingI CT where+ sing = SCT+ instance SingI CU where+ sing = SCU+ instance SingI CV where+ sing = SCV+ instance SingI CW where+ sing = SCW+ instance SingI CX where+ sing = SCX+ instance SingI CY where+ sing = SCY+ instance SingI CZ where+ sing = SCZ+ instance (SingI n, SingI n) =>+ SingI (Attr (n :: [AChar]) (n :: U)) where+ sing = (SAttr sing) sing+ instance SingI n => SingI (Sch (n :: [Attribute])) where+ sing = SSch sing+GradingClient/Database.hs:0:0:: Splicing declarations+ return [] ======>+GradingClient/Database.hs:(0,0)-(0,0): Splicing expression+ cases ''Row [| r |] [| changeId (n ++ (getId r)) r |]+ ======>+ case r of+ EmptyRow _ -> (changeId (((++) n) (getId r))) r+ ConsRow _ _ -> (changeId (((++) n) (getId r))) r
tests/compile-and-dump/GradingClient/Database.hs view
@@ -1,7 +1,7 @@ {- Database.hs (c) Richard Eisenberg 2012-eir@cis.upenn.edu+rae@cs.brynmawr.edu This file contains the full code for the database interface example presented in /Dependently typed programming with singletons/
− tests/compile-and-dump/GradingClient/Main.ghc80.template
@@ -1,162 +0,0 @@-GradingClient/Main.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| lastName, firstName, yearName, gradeName, majorName :: [AChar]- lastName = [CL, CA, CS, CT]- firstName = [CF, CI, CR, CS, CT]- yearName = [CY, CE, CA, CR]- gradeName = [CG, CR, CA, CD, CE]- majorName = [CM, CA, CJ, CO, CR]- gradingSchema :: Schema- gradingSchema- = Sch- [Attr lastName STRING, Attr firstName STRING, Attr yearName NAT,- Attr gradeName NAT, Attr majorName BOOL]- names :: Schema- names = Sch [Attr firstName STRING, Attr lastName STRING] |]- ======>- lastName :: [AChar]- firstName :: [AChar]- yearName :: [AChar]- gradeName :: [AChar]- majorName :: [AChar]- lastName = [CL, CA, CS, CT]- firstName = [CF, CI, CR, CS, CT]- yearName = [CY, CE, CA, CR]- gradeName = [CG, CR, CA, CD, CE]- majorName = [CM, CA, CJ, CO, CR]- gradingSchema :: Schema- gradingSchema- = Sch- [Attr lastName STRING, Attr firstName STRING, Attr yearName NAT,- Attr gradeName NAT, Attr majorName BOOL]- names :: Schema- names = Sch [Attr firstName STRING, Attr lastName STRING]- type MajorNameSym0 = MajorName- type GradeNameSym0 = GradeName- type YearNameSym0 = YearName- type FirstNameSym0 = FirstName- type LastNameSym0 = LastName- type GradingSchemaSym0 = GradingSchema- type NamesSym0 = Names- type family MajorName :: [AChar] where- MajorName = Apply (Apply (:$) CMSym0) (Apply (Apply (:$) CASym0) (Apply (Apply (:$) CJSym0) (Apply (Apply (:$) COSym0) (Apply (Apply (:$) CRSym0) '[]))))- type family GradeName :: [AChar] where- GradeName = Apply (Apply (:$) CGSym0) (Apply (Apply (:$) CRSym0) (Apply (Apply (:$) CASym0) (Apply (Apply (:$) CDSym0) (Apply (Apply (:$) CESym0) '[]))))- type family YearName :: [AChar] where- YearName = Apply (Apply (:$) CYSym0) (Apply (Apply (:$) CESym0) (Apply (Apply (:$) CASym0) (Apply (Apply (:$) CRSym0) '[])))- type family FirstName :: [AChar] where- FirstName = Apply (Apply (:$) CFSym0) (Apply (Apply (:$) CISym0) (Apply (Apply (:$) CRSym0) (Apply (Apply (:$) CSSym0) (Apply (Apply (:$) CTSym0) '[]))))- type family LastName :: [AChar] where- LastName = Apply (Apply (:$) CLSym0) (Apply (Apply (:$) CASym0) (Apply (Apply (:$) CSSym0) (Apply (Apply (:$) CTSym0) '[])))- type family GradingSchema :: Schema where- GradingSchema = Apply SchSym0 (Apply (Apply (:$) (Apply (Apply AttrSym0 LastNameSym0) STRINGSym0)) (Apply (Apply (:$) (Apply (Apply AttrSym0 FirstNameSym0) STRINGSym0)) (Apply (Apply (:$) (Apply (Apply AttrSym0 YearNameSym0) NATSym0)) (Apply (Apply (:$) (Apply (Apply AttrSym0 GradeNameSym0) NATSym0)) (Apply (Apply (:$) (Apply (Apply AttrSym0 MajorNameSym0) BOOLSym0)) '[])))))- type family Names :: Schema where- Names = Apply SchSym0 (Apply (Apply (:$) (Apply (Apply AttrSym0 FirstNameSym0) STRINGSym0)) (Apply (Apply (:$) (Apply (Apply AttrSym0 LastNameSym0) STRINGSym0)) '[]))- sMajorName :: Sing (MajorNameSym0 :: [AChar])- sGradeName :: Sing (GradeNameSym0 :: [AChar])- sYearName :: Sing (YearNameSym0 :: [AChar])- sFirstName :: Sing (FirstNameSym0 :: [AChar])- sLastName :: Sing (LastNameSym0 :: [AChar])- sGradingSchema :: Sing (GradingSchemaSym0 :: Schema)- sNames :: Sing (NamesSym0 :: Schema)- sMajorName- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCM)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCA)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCJ)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCO)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCR) SNil))))- sGradeName- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCG)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCR)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCA)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCD)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCE) SNil))))- sYearName- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCY)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCE)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCA)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCR) SNil)))- sFirstName- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCF)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCI)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCR)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCS)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCT) SNil))))- sLastName- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCL)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCA)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCS)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SCT) SNil)))- sGradingSchema- = applySing- (singFun1 (Proxy :: Proxy SchSym0) SSch)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing (singFun2 (Proxy :: Proxy AttrSym0) SAttr) sLastName)- SSTRING))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing (singFun2 (Proxy :: Proxy AttrSym0) SAttr) sFirstName)- SSTRING))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing (singFun2 (Proxy :: Proxy AttrSym0) SAttr) sYearName)- SNAT))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing (singFun2 (Proxy :: Proxy AttrSym0) SAttr) sGradeName)- SNAT))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing (singFun2 (Proxy :: Proxy AttrSym0) SAttr) sMajorName)- SBOOL))- SNil)))))- sNames- = applySing- (singFun1 (Proxy :: Proxy SchSym0) SSch)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing (singFun2 (Proxy :: Proxy AttrSym0) SAttr) sFirstName)- SSTRING))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing (singFun2 (Proxy :: Proxy AttrSym0) SAttr) sLastName)- SSTRING))- SNil))
+ tests/compile-and-dump/GradingClient/Main.ghc82.template view
@@ -0,0 +1,123 @@+GradingClient/Main.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| lastName, firstName, yearName, gradeName, majorName :: [AChar]+ lastName = [CL, CA, CS, CT]+ firstName = [CF, CI, CR, CS, CT]+ yearName = [CY, CE, CA, CR]+ gradeName = [CG, CR, CA, CD, CE]+ majorName = [CM, CA, CJ, CO, CR]+ gradingSchema :: Schema+ gradingSchema+ = Sch+ [Attr lastName STRING, Attr firstName STRING, Attr yearName NAT,+ Attr gradeName NAT, Attr majorName BOOL]+ names :: Schema+ names = Sch [Attr firstName STRING, Attr lastName STRING] |]+ ======>+ lastName :: [AChar]+ firstName :: [AChar]+ yearName :: [AChar]+ gradeName :: [AChar]+ majorName :: [AChar]+ lastName = [CL, CA, CS, CT]+ firstName = [CF, CI, CR, CS, CT]+ yearName = [CY, CE, CA, CR]+ gradeName = [CG, CR, CA, CD, CE]+ majorName = [CM, CA, CJ, CO, CR]+ gradingSchema :: Schema+ gradingSchema+ = Sch+ [(Attr lastName) STRING, (Attr firstName) STRING,+ (Attr yearName) NAT, (Attr gradeName) NAT, (Attr majorName) BOOL]+ names :: Schema+ names = Sch [(Attr firstName) STRING, (Attr lastName) STRING]+ type MajorNameSym0 = MajorName+ type GradeNameSym0 = GradeName+ type YearNameSym0 = YearName+ type FirstNameSym0 = FirstName+ type LastNameSym0 = LastName+ type GradingSchemaSym0 = GradingSchema+ type NamesSym0 = Names+ type family MajorName :: [AChar] where+ = Apply (Apply (:$) CMSym0) (Apply (Apply (:$) CASym0) (Apply (Apply (:$) CJSym0) (Apply (Apply (:$) COSym0) (Apply (Apply (:$) CRSym0) '[]))))+ type family GradeName :: [AChar] where+ = Apply (Apply (:$) CGSym0) (Apply (Apply (:$) CRSym0) (Apply (Apply (:$) CASym0) (Apply (Apply (:$) CDSym0) (Apply (Apply (:$) CESym0) '[]))))+ type family YearName :: [AChar] where+ = Apply (Apply (:$) CYSym0) (Apply (Apply (:$) CESym0) (Apply (Apply (:$) CASym0) (Apply (Apply (:$) CRSym0) '[])))+ type family FirstName :: [AChar] where+ = Apply (Apply (:$) CFSym0) (Apply (Apply (:$) CISym0) (Apply (Apply (:$) CRSym0) (Apply (Apply (:$) CSSym0) (Apply (Apply (:$) CTSym0) '[]))))+ type family LastName :: [AChar] where+ = Apply (Apply (:$) CLSym0) (Apply (Apply (:$) CASym0) (Apply (Apply (:$) CSSym0) (Apply (Apply (:$) CTSym0) '[])))+ type family GradingSchema :: Schema where+ = Apply SchSym0 (Apply (Apply (:$) (Apply (Apply AttrSym0 LastNameSym0) STRINGSym0)) (Apply (Apply (:$) (Apply (Apply AttrSym0 FirstNameSym0) STRINGSym0)) (Apply (Apply (:$) (Apply (Apply AttrSym0 YearNameSym0) NATSym0)) (Apply (Apply (:$) (Apply (Apply AttrSym0 GradeNameSym0) NATSym0)) (Apply (Apply (:$) (Apply (Apply AttrSym0 MajorNameSym0) BOOLSym0)) '[])))))+ type family Names :: Schema where+ = Apply SchSym0 (Apply (Apply (:$) (Apply (Apply AttrSym0 FirstNameSym0) STRINGSym0)) (Apply (Apply (:$) (Apply (Apply AttrSym0 LastNameSym0) STRINGSym0)) '[]))+ sMajorName :: Sing (MajorNameSym0 :: [AChar])+ sGradeName :: Sing (GradeNameSym0 :: [AChar])+ sYearName :: Sing (YearNameSym0 :: [AChar])+ sFirstName :: Sing (FirstNameSym0 :: [AChar])+ sLastName :: Sing (LastNameSym0 :: [AChar])+ sGradingSchema :: Sing (GradingSchemaSym0 :: Schema)+ sNames :: Sing (NamesSym0 :: Schema)+ sMajorName+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) SCM))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCA))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCJ))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCO))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCR)) SNil))))+ sGradeName+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) SCG))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCR))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCA))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCD))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCE)) SNil))))+ sYearName+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) SCY))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCE))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCA))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCR)) SNil)))+ sFirstName+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) SCF))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCI))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCR))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCS))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCT)) SNil))))+ sLastName+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) SCL))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCA))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCS))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SCT)) SNil)))+ sGradingSchema+ = (applySing ((singFun1 @SchSym0) SSch))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sLastName))+ SSTRING)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sFirstName))+ SSTRING)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sYearName))+ SNAT)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sGradeName))+ SNAT)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sMajorName))+ SBOOL)))+ SNil)))))+ sNames+ = (applySing ((singFun1 @SchSym0) SSch))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sFirstName))+ SSTRING)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sLastName))+ SSTRING)))+ SNil))
tests/compile-and-dump/GradingClient/Main.hs view
@@ -1,7 +1,7 @@ {- GradingClient.hs (c) Richard Eisenberg 2012-eir@cis.upenn.edu+rae@cs.brynmawr.edu This file accesses the database described in Database.hs and performs some basic queries on it.
− tests/compile-and-dump/InsertionSort/InsertionSortImp.ghc80.template
@@ -1,240 +0,0 @@-InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations- singletons [d| data Nat = Zero | Succ Nat |]- ======>- data Nat = Zero | Succ Nat- type ZeroSym0 = Zero- type SuccSym1 (t :: Nat) = Succ t- instance SuppressUnusedWarnings SuccSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) SuccSym0KindInference GHC.Tuple.())- data SuccSym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply SuccSym0 arg) ~ KindOf (SuccSym1 arg) =>- SuccSym0KindInference- type instance Apply SuccSym0 l = SuccSym1 l- data instance Sing (z :: Nat)- = z ~ Zero => SZero |- forall (n :: Nat). z ~ Succ n => SSucc (Sing (n :: Nat))- type SNat = (Sing :: Nat -> GHC.Types.Type)- instance SingKind Nat where- type DemoteRep Nat = Nat- fromSing SZero = Zero- fromSing (SSucc b) = Succ (fromSing b)- toSing Zero = SomeSing SZero- toSing (Succ b)- = case toSing b :: SomeSing Nat of {- SomeSing c -> SomeSing (SSucc c) }- instance SingI Zero where- sing = SZero- instance SingI n => SingI (Succ (n :: Nat)) where- sing = SSucc sing-InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| leq :: Nat -> Nat -> Bool- leq Zero _ = True- leq (Succ _) Zero = False- leq (Succ a) (Succ b) = leq a b- insert :: Nat -> [Nat] -> [Nat]- insert n [] = [n]- insert n (h : t)- = if leq n h then (n : h : t) else h : (insert n t)- insertionSort :: [Nat] -> [Nat]- insertionSort [] = []- insertionSort (h : t) = insert h (insertionSort t) |]- ======>- leq :: Nat -> Nat -> Bool- leq Zero _ = True- leq (Succ _) Zero = False- leq (Succ a) (Succ b) = leq a b- insert :: Nat -> [Nat] -> [Nat]- insert n GHC.Types.[] = [n]- insert n (h GHC.Types.: t)- = if leq n h then- (n GHC.Types.: (h GHC.Types.: t))- else- (h GHC.Types.: (insert n t))- insertionSort :: [Nat] -> [Nat]- insertionSort GHC.Types.[] = []- insertionSort (h GHC.Types.: t) = insert h (insertionSort t)- type Let0123456789Scrutinee_0123456789Sym3 t t t =- Let0123456789Scrutinee_0123456789 t t t- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym2KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Let0123456789Scrutinee_0123456789Sym2 l l) arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym3 l l arg) =>- Let0123456789Scrutinee_0123456789Sym2KindInference- type instance Apply (Let0123456789Scrutinee_0123456789Sym2 l l) l = Let0123456789Scrutinee_0123456789Sym3 l l l- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym1KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym1 l l- = forall arg. KindOf (Apply (Let0123456789Scrutinee_0123456789Sym1 l) arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym2 l arg) =>- Let0123456789Scrutinee_0123456789Sym1KindInference- type instance Apply (Let0123456789Scrutinee_0123456789Sym1 l) l = Let0123456789Scrutinee_0123456789Sym2 l l- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym0KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym0 l- = forall arg. KindOf (Apply Let0123456789Scrutinee_0123456789Sym0 arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym1 arg) =>- Let0123456789Scrutinee_0123456789Sym0KindInference- type instance Apply Let0123456789Scrutinee_0123456789Sym0 l = Let0123456789Scrutinee_0123456789Sym1 l- type family Let0123456789Scrutinee_0123456789 n h t where- Let0123456789Scrutinee_0123456789 n h t = Apply (Apply LeqSym0 n) h- type family Case_0123456789 n h t t where- Case_0123456789 n h t True = Apply (Apply (:$) n) (Apply (Apply (:$) h) t)- Case_0123456789 n h t False = Apply (Apply (:$) h) (Apply (Apply InsertSym0 n) t)- type LeqSym2 (t :: Nat) (t :: Nat) = Leq t t- instance SuppressUnusedWarnings LeqSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) LeqSym1KindInference GHC.Tuple.())- data LeqSym1 (l :: Nat) (l :: TyFun Nat Bool)- = forall arg. KindOf (Apply (LeqSym1 l) arg) ~ KindOf (LeqSym2 l arg) =>- LeqSym1KindInference- type instance Apply (LeqSym1 l) l = LeqSym2 l l- instance SuppressUnusedWarnings LeqSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) LeqSym0KindInference GHC.Tuple.())- data LeqSym0 (l :: TyFun Nat (TyFun Nat Bool -> GHC.Types.Type))- = forall arg. KindOf (Apply LeqSym0 arg) ~ KindOf (LeqSym1 arg) =>- LeqSym0KindInference- type instance Apply LeqSym0 l = LeqSym1 l- type InsertSym2 (t :: Nat) (t :: [Nat]) = Insert t t- instance SuppressUnusedWarnings InsertSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) InsertSym1KindInference GHC.Tuple.())- data InsertSym1 (l :: Nat) (l :: TyFun [Nat] [Nat])- = forall arg. KindOf (Apply (InsertSym1 l) arg) ~ KindOf (InsertSym2 l arg) =>- InsertSym1KindInference- type instance Apply (InsertSym1 l) l = InsertSym2 l l- instance SuppressUnusedWarnings InsertSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) InsertSym0KindInference GHC.Tuple.())- data InsertSym0 (l :: TyFun Nat (TyFun [Nat] [Nat]- -> GHC.Types.Type))- = forall arg. KindOf (Apply InsertSym0 arg) ~ KindOf (InsertSym1 arg) =>- InsertSym0KindInference- type instance Apply InsertSym0 l = InsertSym1 l- type InsertionSortSym1 (t :: [Nat]) = InsertionSort t- instance SuppressUnusedWarnings InsertionSortSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) InsertionSortSym0KindInference GHC.Tuple.())- data InsertionSortSym0 (l :: TyFun [Nat] [Nat])- = forall arg. KindOf (Apply InsertionSortSym0 arg) ~ KindOf (InsertionSortSym1 arg) =>- InsertionSortSym0KindInference- type instance Apply InsertionSortSym0 l = InsertionSortSym1 l- type family Leq (a :: Nat) (a :: Nat) :: Bool where- Leq Zero _z_0123456789 = TrueSym0- Leq (Succ _z_0123456789) Zero = FalseSym0- Leq (Succ a) (Succ b) = Apply (Apply LeqSym0 a) b- type family Insert (a :: Nat) (a :: [Nat]) :: [Nat] where- Insert n '[] = Apply (Apply (:$) n) '[]- Insert n ((:) h t) = Case_0123456789 n h t (Let0123456789Scrutinee_0123456789Sym3 n h t)- type family InsertionSort (a :: [Nat]) :: [Nat] where- InsertionSort '[] = '[]- InsertionSort ((:) h t) = Apply (Apply InsertSym0 h) (Apply InsertionSortSym0 t)- sLeq ::- forall (t :: Nat) (t :: Nat).- Sing t -> Sing t -> Sing (Apply (Apply LeqSym0 t) t :: Bool)- sInsert ::- forall (t :: Nat) (t :: [Nat]).- Sing t -> Sing t -> Sing (Apply (Apply InsertSym0 t) t :: [Nat])- sInsertionSort ::- forall (t :: [Nat]).- Sing t -> Sing (Apply InsertionSortSym0 t :: [Nat])- sLeq SZero _s_z_0123456789- = let- lambda ::- forall _z_0123456789.- (t ~ ZeroSym0, t ~ _z_0123456789) =>- Sing _z_0123456789 -> Sing (Apply (Apply LeqSym0 t) t :: Bool)- lambda _z_0123456789 = STrue- in lambda _s_z_0123456789- sLeq (SSucc _s_z_0123456789) SZero- = let- lambda ::- forall _z_0123456789.- (t ~ Apply SuccSym0 _z_0123456789, t ~ ZeroSym0) =>- Sing _z_0123456789 -> Sing (Apply (Apply LeqSym0 t) t :: Bool)- lambda _z_0123456789 = SFalse- in lambda _s_z_0123456789- sLeq (SSucc sA) (SSucc sB)- = let- lambda ::- forall a b.- (t ~ Apply SuccSym0 a, t ~ Apply SuccSym0 b) =>- Sing a -> Sing b -> Sing (Apply (Apply LeqSym0 t) t :: Bool)- lambda a b- = applySing- (applySing (singFun2 (Proxy :: Proxy LeqSym0) sLeq) a) b- in lambda sA sB- sInsert sN SNil- = let- lambda ::- forall n.- (t ~ n, t ~ '[]) =>- Sing n -> Sing (Apply (Apply InsertSym0 t) t :: [Nat])- lambda n- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) n) SNil- in lambda sN- sInsert sN (SCons sH sT)- = let- lambda ::- forall n h t.- (t ~ n, t ~ Apply (Apply (:$) h) t) =>- Sing n- -> Sing h -> Sing t -> Sing (Apply (Apply InsertSym0 t) t :: [Nat])- lambda n h t- = let- sScrutinee_0123456789 ::- Sing (Let0123456789Scrutinee_0123456789Sym3 n h t)- sScrutinee_0123456789- = applySing- (applySing (singFun2 (Proxy :: Proxy LeqSym0) sLeq) n) h- in case sScrutinee_0123456789 of {- STrue- -> let- lambda ::- TrueSym0 ~ Let0123456789Scrutinee_0123456789Sym3 n h t =>- Sing (Case_0123456789 n h t TrueSym0 :: [Nat])- lambda- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) n)- (applySing (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) h) t)- in lambda- SFalse- -> let- lambda ::- FalseSym0 ~ Let0123456789Scrutinee_0123456789Sym3 n h t =>- Sing (Case_0123456789 n h t FalseSym0 :: [Nat])- lambda- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) h)- (applySing- (applySing (singFun2 (Proxy :: Proxy InsertSym0) sInsert) n) t)- in lambda } ::- Sing (Case_0123456789 n h t (Let0123456789Scrutinee_0123456789Sym3 n h t) :: [Nat])- in lambda sN sH sT- sInsertionSort SNil- = let- lambda :: t ~ '[] => Sing (Apply InsertionSortSym0 t :: [Nat])- lambda = SNil- in lambda- sInsertionSort (SCons sH sT)- = let- lambda ::- forall h t.- t ~ Apply (Apply (:$) h) t =>- Sing h -> Sing t -> Sing (Apply InsertionSortSym0 t :: [Nat])- lambda h t- = applySing- (applySing (singFun2 (Proxy :: Proxy InsertSym0) sInsert) h)- (applySing- (singFun1 (Proxy :: Proxy InsertionSortSym0) sInsertionSort) t)- in lambda sH sT
+ tests/compile-and-dump/InsertionSort/InsertionSortImp.ghc82.template view
@@ -0,0 +1,177 @@+InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations+ singletons [d| data Nat = Zero | Succ Nat |]+ ======>+ data Nat = Zero | Succ Nat+ type ZeroSym0 = Zero+ type SuccSym1 (t :: Nat) = Succ t+ instance SuppressUnusedWarnings SuccSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) SuccSym0KindInference) GHC.Tuple.())+ data SuccSym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>+ SuccSym0KindInference+ type instance Apply SuccSym0 l = Succ l+ data instance Sing (z :: Nat)+ = z ~ Zero => SZero |+ forall (n :: Nat). z ~ Succ n => SSucc (Sing (n :: Nat))+ type SNat = (Sing :: Nat -> GHC.Types.Type)+ instance SingKind Nat where+ type Demote Nat = Nat+ fromSing SZero = Zero+ fromSing (SSucc b) = Succ (fromSing b)+ toSing Zero = SomeSing SZero+ toSing (Succ b)+ = case toSing b :: SomeSing Nat of {+ SomeSing c -> SomeSing (SSucc c) }+ instance SingI Zero where+ sing = SZero+ instance SingI n => SingI (Succ (n :: Nat)) where+ sing = SSucc sing+InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| leq :: Nat -> Nat -> Bool+ leq Zero _ = True+ leq (Succ _) Zero = False+ leq (Succ a) (Succ b) = leq a b+ insert :: Nat -> [Nat] -> [Nat]+ insert n [] = [n]+ insert n (h : t)+ = if leq n h then (n : h : t) else h : (insert n t)+ insertionSort :: [Nat] -> [Nat]+ insertionSort [] = []+ insertionSort (h : t) = insert h (insertionSort t) |]+ ======>+ leq :: Nat -> Nat -> Bool+ leq Zero _ = True+ leq (Succ _) Zero = False+ leq (Succ a) (Succ b) = (leq a) b+ insert :: Nat -> [Nat] -> [Nat]+ insert n GHC.Types.[] = [n]+ insert n (h GHC.Types.: t)+ = if (leq n) h then+ (n GHC.Types.: (h GHC.Types.: t))+ else+ (h GHC.Types.: ((insert n) t))+ insertionSort :: [Nat] -> [Nat]+ insertionSort GHC.Types.[] = []+ insertionSort (h GHC.Types.: t) = (insert h) (insertionSort t)+ type Let0123456789876543210Scrutinee_0123456789876543210Sym3 t t t =+ Let0123456789876543210Scrutinee_0123456789876543210 t t t+ instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Let0123456789876543210Scrutinee_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 l l) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym3 l l arg) =>+ Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference+ type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 l l) l = Let0123456789876543210Scrutinee_0123456789876543210 l l l+ instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210Scrutinee_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 l) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym2 l arg) =>+ Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference+ type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 l) l = Let0123456789876543210Scrutinee_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210Scrutinee_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>+ Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference+ type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 l = Let0123456789876543210Scrutinee_0123456789876543210Sym1 l+ type family Let0123456789876543210Scrutinee_0123456789876543210 n h t where+ Let0123456789876543210Scrutinee_0123456789876543210 n h t = Apply (Apply LeqSym0 n) h+ type family Case_0123456789876543210 n h t t where+ Case_0123456789876543210 n h t True = Apply (Apply (:$) n) (Apply (Apply (:$) h) t)+ Case_0123456789876543210 n h t False = Apply (Apply (:$) h) (Apply (Apply InsertSym0 n) t)+ type LeqSym2 (t :: Nat) (t :: Nat) = Leq t t+ instance SuppressUnusedWarnings LeqSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) LeqSym1KindInference) GHC.Tuple.())+ data LeqSym1 (l :: Nat) (l :: TyFun Nat Bool)+ = forall arg. SameKind (Apply (LeqSym1 l) arg) (LeqSym2 l arg) =>+ LeqSym1KindInference+ type instance Apply (LeqSym1 l) l = Leq l l+ instance SuppressUnusedWarnings LeqSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) LeqSym0KindInference) GHC.Tuple.())+ data LeqSym0 (l :: TyFun Nat (TyFun Nat Bool -> GHC.Types.Type))+ = forall arg. SameKind (Apply LeqSym0 arg) (LeqSym1 arg) =>+ LeqSym0KindInference+ type instance Apply LeqSym0 l = LeqSym1 l+ type InsertSym2 (t :: Nat) (t :: [Nat]) = Insert t t+ instance SuppressUnusedWarnings InsertSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) InsertSym1KindInference) GHC.Tuple.())+ data InsertSym1 (l :: Nat) (l :: TyFun [Nat] [Nat])+ = forall arg. SameKind (Apply (InsertSym1 l) arg) (InsertSym2 l arg) =>+ InsertSym1KindInference+ type instance Apply (InsertSym1 l) l = Insert l l+ instance SuppressUnusedWarnings InsertSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) InsertSym0KindInference) GHC.Tuple.())+ data InsertSym0 (l :: TyFun Nat (TyFun [Nat] [Nat]+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply InsertSym0 arg) (InsertSym1 arg) =>+ InsertSym0KindInference+ type instance Apply InsertSym0 l = InsertSym1 l+ type InsertionSortSym1 (t :: [Nat]) = InsertionSort t+ instance SuppressUnusedWarnings InsertionSortSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) InsertionSortSym0KindInference) GHC.Tuple.())+ data InsertionSortSym0 (l :: TyFun [Nat] [Nat])+ = forall arg. SameKind (Apply InsertionSortSym0 arg) (InsertionSortSym1 arg) =>+ InsertionSortSym0KindInference+ type instance Apply InsertionSortSym0 l = InsertionSort l+ type family Leq (a :: Nat) (a :: Nat) :: Bool where+ Leq Zero _z_0123456789876543210 = TrueSym0+ Leq (Succ _z_0123456789876543210) Zero = FalseSym0+ Leq (Succ a) (Succ b) = Apply (Apply LeqSym0 a) b+ type family Insert (a :: Nat) (a :: [Nat]) :: [Nat] where+ Insert n '[] = Apply (Apply (:$) n) '[]+ Insert n ((:) h t) = Case_0123456789876543210 n h t (Let0123456789876543210Scrutinee_0123456789876543210Sym3 n h t)+ type family InsertionSort (a :: [Nat]) :: [Nat] where+ InsertionSort '[] = '[]+ InsertionSort ((:) h t) = Apply (Apply InsertSym0 h) (Apply InsertionSortSym0 t)+ sLeq ::+ forall (t :: Nat) (t :: Nat).+ Sing t -> Sing t -> Sing (Apply (Apply LeqSym0 t) t :: Bool)+ sInsert ::+ forall (t :: Nat) (t :: [Nat]).+ Sing t -> Sing t -> Sing (Apply (Apply InsertSym0 t) t :: [Nat])+ sInsertionSort ::+ forall (t :: [Nat]).+ Sing t -> Sing (Apply InsertionSortSym0 t :: [Nat])+ sLeq SZero _ = STrue+ sLeq (SSucc _) SZero = SFalse+ sLeq (SSucc (sA :: Sing a)) (SSucc (sB :: Sing b))+ = (applySing ((applySing ((singFun2 @LeqSym0) sLeq)) sA)) sB+ sInsert (sN :: Sing n) SNil+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) sN)) SNil+ sInsert (sN :: Sing n) (SCons (sH :: Sing h) (sT :: Sing t))+ = let+ sScrutinee_0123456789876543210 ::+ Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym3 n h t)+ sScrutinee_0123456789876543210+ = (applySing ((applySing ((singFun2 @LeqSym0) sLeq)) sN)) sH+ in case sScrutinee_0123456789876543210 of+ STrue+ -> (applySing ((applySing ((singFun2 @(:$)) SCons)) sN))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) sH)) sT)+ SFalse+ -> (applySing ((applySing ((singFun2 @(:$)) SCons)) sH))+ ((applySing ((applySing ((singFun2 @InsertSym0) sInsert)) sN))+ sT) ::+ Sing (Case_0123456789876543210 n h t (Let0123456789876543210Scrutinee_0123456789876543210Sym3 n h t) :: [Nat])+ sInsertionSort SNil = SNil+ sInsertionSort (SCons (sH :: Sing h) (sT :: Sing t))+ = (applySing ((applySing ((singFun2 @InsertSym0) sInsert)) sH))+ ((applySing ((singFun1 @InsertionSortSym0) sInsertionSort)) sT)
tests/compile-and-dump/InsertionSort/InsertionSortImp.hs view
@@ -1,7 +1,7 @@ {- InsertionSortImp.hs (c) Richard Eisenberg 2012-eir@cis.upenn.edu+rae@cs.brynmawr.edu This file contains an implementation of insertion sort over natural numbers, along with a Haskell proof that the sort algorithm is correct. The code below
− tests/compile-and-dump/Promote/Constructors.ghc80.template
@@ -1,82 +0,0 @@-Promote/Constructors.hs:(0,0)-(0,0): Splicing declarations- promote- [d| data Foo = Foo | Foo :+ Foo- data Bar = Bar Bar Bar Bar Bar Foo |]- ======>- data Foo = Foo | Foo :+ Foo- data Bar = Bar Bar Bar Bar Bar Foo- type FooSym0 = Foo- type (:+$$$) (t :: Foo) (t :: Foo) = (:+) t t- instance SuppressUnusedWarnings (:+$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:+$$###) GHC.Tuple.())- data (:+$$) (l :: Foo) (l :: TyFun Foo Foo)- = forall arg. KindOf (Apply ((:+$$) l) arg) ~ KindOf ((:+$$$) l arg) =>- (:+$$###)- type instance Apply ((:+$$) l) l = (:+$$$) l l- instance SuppressUnusedWarnings (:+$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:+$###) GHC.Tuple.())- data (:+$) (l :: TyFun Foo (TyFun Foo Foo -> GHC.Types.Type))- = forall arg. KindOf (Apply (:+$) arg) ~ KindOf ((:+$$) arg) =>- (:+$###)- type instance Apply (:+$) l = (:+$$) l- type BarSym5 (t :: Bar)- (t :: Bar)- (t :: Bar)- (t :: Bar)- (t :: Foo) =- Bar t t t t t- instance SuppressUnusedWarnings BarSym4 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BarSym4KindInference GHC.Tuple.())- data BarSym4 (l :: Bar)- (l :: Bar)- (l :: Bar)- (l :: Bar)- (l :: TyFun Foo Bar)- = forall arg. KindOf (Apply (BarSym4 l l l l) arg) ~ KindOf (BarSym5 l l l l arg) =>- BarSym4KindInference- type instance Apply (BarSym4 l l l l) l = BarSym5 l l l l l- instance SuppressUnusedWarnings BarSym3 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BarSym3KindInference GHC.Tuple.())- data BarSym3 (l :: Bar)- (l :: Bar)- (l :: Bar)- (l :: TyFun Bar (TyFun Foo Bar -> GHC.Types.Type))- = forall arg. KindOf (Apply (BarSym3 l l l) arg) ~ KindOf (BarSym4 l l l arg) =>- BarSym3KindInference- type instance Apply (BarSym3 l l l) l = BarSym4 l l l l- instance SuppressUnusedWarnings BarSym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BarSym2KindInference GHC.Tuple.())- data BarSym2 (l :: Bar)- (l :: Bar)- (l :: TyFun Bar (TyFun Bar (TyFun Foo Bar -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (BarSym2 l l) arg) ~ KindOf (BarSym3 l l arg) =>- BarSym2KindInference- type instance Apply (BarSym2 l l) l = BarSym3 l l l- instance SuppressUnusedWarnings BarSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BarSym1KindInference GHC.Tuple.())- data BarSym1 (l :: Bar)- (l :: TyFun Bar (TyFun Bar (TyFun Bar (TyFun Foo Bar- -> GHC.Types.Type)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (BarSym1 l) arg) ~ KindOf (BarSym2 l arg) =>- BarSym1KindInference- type instance Apply (BarSym1 l) l = BarSym2 l l- instance SuppressUnusedWarnings BarSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BarSym0KindInference GHC.Tuple.())- data BarSym0 (l :: TyFun Bar (TyFun Bar (TyFun Bar (TyFun Bar (TyFun Foo Bar- -> GHC.Types.Type)- -> GHC.Types.Type)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply BarSym0 arg) ~ KindOf (BarSym1 arg) =>- BarSym0KindInference- type instance Apply BarSym0 l = BarSym1 l
+ tests/compile-and-dump/Promote/Constructors.ghc82.template view
@@ -0,0 +1,69 @@+Promote/Constructors.hs:(0,0)-(0,0): Splicing declarations+ promote+ [d| data Foo = Foo | Foo :+ Foo+ data Bar = Bar Bar Bar Bar Bar Foo |]+ ======>+ data Foo = Foo | Foo :+ Foo+ data Bar = Bar Bar Bar Bar Bar Foo+ type FooSym0 = Foo+ type (:+$$$) (t :: Foo) (t :: Foo) = (:+) t t+ instance SuppressUnusedWarnings (:+$$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:+$$###)) GHC.Tuple.())+ data (:+$$) (l :: Foo) (l :: TyFun Foo Foo)+ = forall arg. SameKind (Apply ((:+$$) l) arg) ((:+$$$) l arg) =>+ (:+$$###)+ type instance Apply ((:+$$) l) l = (:+) l l+ instance SuppressUnusedWarnings (:+$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:+$###)) GHC.Tuple.())+ data (:+$) (l :: TyFun Foo (TyFun Foo Foo -> GHC.Types.Type))+ = forall arg. SameKind (Apply (:+$) arg) ((:+$$) arg) => (:+$###)+ type instance Apply (:+$) l = (:+$$) l+ type BarSym5 (t :: Bar) (t :: Bar) (t :: Bar) (t :: Bar) (t :: Foo) =+ Bar t t t t t+ instance SuppressUnusedWarnings BarSym4 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BarSym4KindInference) GHC.Tuple.())+ data BarSym4 (l :: Bar) (l :: Bar) (l :: Bar) (l :: Bar) (l :: TyFun Foo Bar)+ = forall arg. SameKind (Apply (BarSym4 l l l l) arg) (BarSym5 l l l l arg) =>+ BarSym4KindInference+ type instance Apply (BarSym4 l l l l) l = Bar l l l l l+ instance SuppressUnusedWarnings BarSym3 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BarSym3KindInference) GHC.Tuple.())+ data BarSym3 (l :: Bar) (l :: Bar) (l :: Bar) (l :: TyFun Bar (TyFun Foo Bar+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (BarSym3 l l l) arg) (BarSym4 l l l arg) =>+ BarSym3KindInference+ type instance Apply (BarSym3 l l l) l = BarSym4 l l l l+ instance SuppressUnusedWarnings BarSym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BarSym2KindInference) GHC.Tuple.())+ data BarSym2 (l :: Bar) (l :: Bar) (l :: TyFun Bar (TyFun Bar (TyFun Foo Bar+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (BarSym2 l l) arg) (BarSym3 l l arg) =>+ BarSym2KindInference+ type instance Apply (BarSym2 l l) l = BarSym3 l l l+ instance SuppressUnusedWarnings BarSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BarSym1KindInference) GHC.Tuple.())+ data BarSym1 (l :: Bar) (l :: TyFun Bar (TyFun Bar (TyFun Bar (TyFun Foo Bar+ -> GHC.Types.Type)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (BarSym1 l) arg) (BarSym2 l arg) =>+ BarSym1KindInference+ type instance Apply (BarSym1 l) l = BarSym2 l l+ instance SuppressUnusedWarnings BarSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BarSym0KindInference) GHC.Tuple.())+ data BarSym0 (l :: TyFun Bar (TyFun Bar (TyFun Bar (TyFun Bar (TyFun Foo Bar+ -> GHC.Types.Type)+ -> GHC.Types.Type)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>+ BarSym0KindInference+ type instance Apply BarSym0 l = BarSym1 l
− tests/compile-and-dump/Promote/GenDefunSymbols.ghc80.template
@@ -1,47 +0,0 @@-Promote/GenDefunSymbols.hs:0:0:: Splicing declarations- genDefunSymbols [''LiftMaybe, ''NatT, '':+]- ======>- type LiftMaybeSym2 (t :: TyFun a0123456789 b0123456789 -> Type)- (t :: Maybe a0123456789) =- LiftMaybe t t- instance SuppressUnusedWarnings LiftMaybeSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) LiftMaybeSym1KindInference GHC.Tuple.())- data LiftMaybeSym1 (l :: TyFun a0123456789 b0123456789 -> Type)- (l :: TyFun (Maybe a0123456789) (Maybe b0123456789))- = forall arg. Data.Singletons.KindOf (Apply (LiftMaybeSym1 l) arg) ~ Data.Singletons.KindOf (LiftMaybeSym2 l arg) =>- LiftMaybeSym1KindInference- type instance Apply (LiftMaybeSym1 l) l = LiftMaybeSym2 l l- instance SuppressUnusedWarnings LiftMaybeSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) LiftMaybeSym0KindInference GHC.Tuple.())- data LiftMaybeSym0 (l :: TyFun (TyFun a0123456789 b0123456789- -> Type) (TyFun (Maybe a0123456789) (Maybe b0123456789)- -> Type))- = forall arg. Data.Singletons.KindOf (Apply LiftMaybeSym0 arg) ~ Data.Singletons.KindOf (LiftMaybeSym1 arg) =>- LiftMaybeSym0KindInference- type instance Apply LiftMaybeSym0 l = LiftMaybeSym1 l- type ZeroSym0 = Zero- type SuccSym1 (t :: NatT) = Succ t- instance SuppressUnusedWarnings SuccSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) SuccSym0KindInference GHC.Tuple.())- data SuccSym0 (l :: TyFun NatT NatT)- = forall arg. Data.Singletons.KindOf (Apply SuccSym0 arg) ~ Data.Singletons.KindOf (SuccSym1 arg) =>- SuccSym0KindInference- type instance Apply SuccSym0 l = SuccSym1 l- type (:+$$$) (t :: Nat) (t :: Nat) = (:+) t t- instance SuppressUnusedWarnings (:+$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:+$$###) GHC.Tuple.())- data (:+$$) (l :: Nat) l- = forall arg. Data.Singletons.KindOf (Apply ((:+$$) l) arg) ~ Data.Singletons.KindOf ((:+$$$) l arg) =>- (:+$$###)- type instance Apply ((:+$$) l) l = (:+$$$) l l- instance SuppressUnusedWarnings (:+$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:+$###) GHC.Tuple.())- data (:+$) l- = forall arg. Data.Singletons.KindOf (Apply (:+$) arg) ~ Data.Singletons.KindOf ((:+$$) arg) =>- (:+$###)- type instance Apply (:+$) l = (:+$$) l
+ tests/compile-and-dump/Promote/GenDefunSymbols.ghc82.template view
@@ -0,0 +1,47 @@+Promote/GenDefunSymbols.hs:0:0:: Splicing declarations+ genDefunSymbols [''LiftMaybe, ''NatT, ''(:+)]+ ======>+ type LiftMaybeSym2 (t :: TyFun a0123456789876543210 b0123456789876543210+ -> Type) (t :: Maybe a0123456789876543210) =+ LiftMaybe t t+ instance SuppressUnusedWarnings LiftMaybeSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) LiftMaybeSym1KindInference) GHC.Tuple.())+ data LiftMaybeSym1 (l :: TyFun a0123456789876543210 b0123456789876543210+ -> Type) (l :: TyFun (Maybe a0123456789876543210) (Maybe b0123456789876543210))+ = forall arg. Data.Singletons.SameKind (Apply (LiftMaybeSym1 l) arg) (LiftMaybeSym2 l arg) =>+ LiftMaybeSym1KindInference+ type instance Apply (LiftMaybeSym1 l) l = LiftMaybe l l+ instance SuppressUnusedWarnings LiftMaybeSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) LiftMaybeSym0KindInference) GHC.Tuple.())+ data LiftMaybeSym0 (l :: TyFun (TyFun a0123456789876543210 b0123456789876543210+ -> Type) (TyFun (Maybe a0123456789876543210) (Maybe b0123456789876543210)+ -> Type))+ = forall arg. Data.Singletons.SameKind (Apply LiftMaybeSym0 arg) (LiftMaybeSym1 arg) =>+ LiftMaybeSym0KindInference+ type instance Apply LiftMaybeSym0 l = LiftMaybeSym1 l+ type ZeroSym0 = Zero+ type SuccSym1 (t :: NatT) = Succ t+ instance SuppressUnusedWarnings SuccSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) SuccSym0KindInference) GHC.Tuple.())+ data SuccSym0 (l :: TyFun NatT NatT)+ = forall arg. Data.Singletons.SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>+ SuccSym0KindInference+ type instance Apply SuccSym0 l = Succ l+ type (:+$$$) (t :: Nat) (t :: Nat) = (:+) t t+ instance SuppressUnusedWarnings (:+$$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:+$$###)) GHC.Tuple.())+ data (:+$$) (l :: Nat) l+ = forall arg. Data.Singletons.SameKind (Apply ((:+$$) l) arg) ((:+$$$) l arg) =>+ (:+$$###)+ type instance Apply ((:+$$) l) l = (:+) l l+ instance SuppressUnusedWarnings (:+$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:+$###)) GHC.Tuple.())+ data (:+$) l+ = forall arg. Data.Singletons.SameKind (Apply (:+$) arg) ((:+$$) arg) =>+ (:+$###)+ type instance Apply (:+$) l = (:+$$) l
− tests/compile-and-dump/Promote/Newtypes.ghc80.template
@@ -1,42 +0,0 @@-Promote/Newtypes.hs:(0,0)-(0,0): Splicing declarations- promote- [d| newtype Foo- = Foo Nat- deriving (Eq)- newtype Bar = Bar {unBar :: Nat} |]- ======>- newtype Foo- = Foo Nat- deriving (Eq)- newtype Bar = Bar {unBar :: Nat}- type UnBarSym1 (t :: Bar) = UnBar t- instance SuppressUnusedWarnings UnBarSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) UnBarSym0KindInference GHC.Tuple.())- data UnBarSym0 (l :: TyFun Bar Nat)- = forall arg. KindOf (Apply UnBarSym0 arg) ~ KindOf (UnBarSym1 arg) =>- UnBarSym0KindInference- type instance Apply UnBarSym0 l = UnBarSym1 l- type family UnBar (a :: Bar) :: Nat where- UnBar (Bar field) = field- type family Equals_0123456789 (a :: Foo) (b :: Foo) :: Bool where- Equals_0123456789 (Foo a) (Foo b) = (:==) a b- Equals_0123456789 (a :: Foo) (b :: Foo) = FalseSym0- instance PEq (Proxy :: Proxy Foo) where- type (:==) (a :: Foo) (b :: Foo) = Equals_0123456789 a b- type FooSym1 (t :: Nat) = Foo t- instance SuppressUnusedWarnings FooSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym0KindInference GHC.Tuple.())- data FooSym0 (l :: TyFun Nat Foo)- = forall arg. KindOf (Apply FooSym0 arg) ~ KindOf (FooSym1 arg) =>- FooSym0KindInference- type instance Apply FooSym0 l = FooSym1 l- type BarSym1 (t :: Nat) = Bar t- instance SuppressUnusedWarnings BarSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BarSym0KindInference GHC.Tuple.())- data BarSym0 (l :: TyFun Nat Bar)- = forall arg. KindOf (Apply BarSym0 arg) ~ KindOf (BarSym1 arg) =>- BarSym0KindInference- type instance Apply BarSym0 l = BarSym1 l
+ tests/compile-and-dump/Promote/Newtypes.ghc82.template view
@@ -0,0 +1,42 @@+Promote/Newtypes.hs:(0,0)-(0,0): Splicing declarations+ promote+ [d| newtype Foo+ = Foo Nat+ deriving Eq+ newtype Bar = Bar {unBar :: Nat} |]+ ======>+ newtype Foo+ = Foo Nat+ deriving Eq+ newtype Bar = Bar {unBar :: Nat}+ type UnBarSym1 (t :: Bar) = UnBar t+ instance SuppressUnusedWarnings UnBarSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) UnBarSym0KindInference) GHC.Tuple.())+ data UnBarSym0 (l :: TyFun Bar Nat)+ = forall arg. SameKind (Apply UnBarSym0 arg) (UnBarSym1 arg) =>+ UnBarSym0KindInference+ type instance Apply UnBarSym0 l = UnBar l+ type family UnBar (a :: Bar) :: Nat where+ UnBar (Bar field) = field+ type family Equals_0123456789876543210 (a :: Foo) (b :: Foo) :: Bool where+ Equals_0123456789876543210 (Foo a) (Foo b) = (:==) a b+ Equals_0123456789876543210 (a :: Foo) (b :: Foo) = FalseSym0+ instance PEq Foo where+ type (:==) (a :: Foo) (b :: Foo) = Equals_0123456789876543210 a b+ type FooSym1 (t :: Nat) = Foo t+ instance SuppressUnusedWarnings FooSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym0KindInference) GHC.Tuple.())+ data FooSym0 (l :: TyFun Nat Foo)+ = forall arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>+ FooSym0KindInference+ type instance Apply FooSym0 l = Foo l+ type BarSym1 (t :: Nat) = Bar t+ instance SuppressUnusedWarnings BarSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BarSym0KindInference) GHC.Tuple.())+ data BarSym0 (l :: TyFun Nat Bar)+ = forall arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>+ BarSym0KindInference+ type instance Apply BarSym0 l = Bar l
− tests/compile-and-dump/Promote/Pragmas.ghc80.template
@@ -1,12 +0,0 @@-Promote/Pragmas.hs:(0,0)-(0,0): Splicing declarations- promote- [d| {-# INLINE foo #-}- foo :: Bool- foo = True |]- ======>- {-# INLINE foo #-}- foo :: Bool- foo = True- type FooSym0 = Foo- type family Foo :: Bool where- Foo = TrueSym0
+ tests/compile-and-dump/Promote/Pragmas.ghc82.template view
@@ -0,0 +1,12 @@+Promote/Pragmas.hs:(0,0)-(0,0): Splicing declarations+ promote+ [d| {-# INLINE foo #-}+ foo :: Bool+ foo = True |]+ ======>+ {-# INLINE foo #-}+ foo :: Bool+ foo = True+ type FooSym0 = Foo+ type family Foo :: Bool where+ = TrueSym0
− tests/compile-and-dump/Promote/Prelude.ghc80.template
@@ -1,17 +0,0 @@-Promote/Prelude.hs:(0,0)-(0,0): Splicing declarations- promoteOnly- [d| odd :: Nat -> Bool- odd 0 = False- odd n = not . odd $ n - 1 |]- ======>- type OddSym1 (t :: Nat) = Odd t- instance SuppressUnusedWarnings OddSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) OddSym0KindInference GHC.Tuple.())- data OddSym0 (l :: TyFun Nat Bool)- = forall arg. Data.Singletons.KindOf (Apply OddSym0 arg) ~ Data.Singletons.KindOf (OddSym1 arg) =>- OddSym0KindInference- type instance Apply OddSym0 l = OddSym1 l- type family Odd (a :: Nat) :: Bool where- Odd 0 = FalseSym0- Odd n = Apply (Apply ($$) (Apply (Apply (:.$) NotSym0) OddSym0)) (Apply (Apply (:-$) n) (FromInteger 1))
+ tests/compile-and-dump/Promote/Prelude.ghc82.template view
@@ -0,0 +1,17 @@+Promote/Prelude.hs:(0,0)-(0,0): Splicing declarations+ promoteOnly+ [d| odd :: Nat -> Bool+ odd 0 = False+ odd n = not . odd $ n - 1 |]+ ======>+ type OddSym1 (t :: Nat) = Odd t+ instance SuppressUnusedWarnings OddSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) OddSym0KindInference) GHC.Tuple.())+ data OddSym0 (l :: TyFun Nat Bool)+ = forall arg. Data.Singletons.SameKind (Apply OddSym0 arg) (OddSym1 arg) =>+ OddSym0KindInference+ type instance Apply OddSym0 l = Odd l+ type family Odd (a :: Nat) :: Bool where+ Odd 0 = FalseSym0+ Odd n = Apply (Apply ($$) (Apply (Apply (:.$) NotSym0) OddSym0)) (Apply (Apply (:-$) n) (FromInteger 1))
+ tests/compile-and-dump/Promote/T180.ghc82.template view
@@ -0,0 +1,48 @@+Promote/T180.hs:(0,0)-(0,0): Splicing declarations+ promote+ [d| z (X1 x) = x+ z (X2 x) = x+ + data X = X1 {y :: Symbol} | X2 {y :: Symbol} |]+ ======>+ data X = X1 {y :: Symbol} | X2 {y :: Symbol}+ z (X1 x) = x+ z (X2 x) = x+ type ZSym1 t = Z t+ instance SuppressUnusedWarnings ZSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ZSym0KindInference) GHC.Tuple.())+ data ZSym0 l+ = forall arg. SameKind (Apply ZSym0 arg) (ZSym1 arg) =>+ ZSym0KindInference+ type instance Apply ZSym0 l = Z l+ type family Z a where+ Z (X1 x) = x+ Z (X2 x) = x+ type YSym1 (t :: X) = Y t+ instance SuppressUnusedWarnings YSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) YSym0KindInference) GHC.Tuple.())+ data YSym0 (l :: TyFun X Symbol)+ = forall arg. SameKind (Apply YSym0 arg) (YSym1 arg) =>+ YSym0KindInference+ type instance Apply YSym0 l = Y l+ type family Y (a :: X) :: Symbol where+ Y (X1 field) = field+ Y (X2 field) = field+ type X1Sym1 (t :: Symbol) = X1 t+ instance SuppressUnusedWarnings X1Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) X1Sym0KindInference) GHC.Tuple.())+ data X1Sym0 (l :: TyFun Symbol X)+ = forall arg. SameKind (Apply X1Sym0 arg) (X1Sym1 arg) =>+ X1Sym0KindInference+ type instance Apply X1Sym0 l = X1 l+ type X2Sym1 (t :: Symbol) = X2 t+ instance SuppressUnusedWarnings X2Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) X2Sym0KindInference) GHC.Tuple.())+ data X2Sym0 (l :: TyFun Symbol X)+ = forall arg. SameKind (Apply X2Sym0 arg) (X2Sym1 arg) =>+ X2Sym0KindInference+ type instance Apply X2Sym0 l = X2 l
+ tests/compile-and-dump/Promote/T180.hs view
@@ -0,0 +1,10 @@+module T180 where++import Data.Singletons.TH+import Data.Singletons.Prelude++promote [d|+ data X = X1 {y :: Symbol} | X2 {y :: Symbol}+ z (X1 x) = x+ z (X2 x) = x+ |]
− tests/compile-and-dump/Singletons/AsPattern.ghc80.template
@@ -1,387 +0,0 @@-Singletons/AsPattern.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| maybePlus :: Maybe Nat -> Maybe Nat- maybePlus (Just n) = Just (plus (Succ Zero) n)- maybePlus p@Nothing = p- bar :: Maybe Nat -> Maybe Nat- bar x@(Just _) = x- bar Nothing = Nothing- baz_ :: Maybe Baz -> Maybe Baz- baz_ p@Nothing = p- baz_ p@(Just (Baz _ _ _)) = p- tup :: (Nat, Nat) -> (Nat, Nat)- tup p@(_, _) = p- foo :: [Nat] -> [Nat]- foo p@[] = p- foo p@[_] = p- foo p@(_ : _ : _) = p- - data Baz = Baz Nat Nat Nat |]- ======>- maybePlus :: Maybe Nat -> Maybe Nat- maybePlus (Just n) = Just (plus (Succ Zero) n)- maybePlus p@Nothing = p- bar :: Maybe Nat -> Maybe Nat- bar x@(Just _) = x- bar Nothing = Nothing- data Baz = Baz Nat Nat Nat- baz_ :: Maybe Baz -> Maybe Baz- baz_ p@Nothing = p- baz_ p@(Just (Baz _ _ _)) = p- tup :: (Nat, Nat) -> (Nat, Nat)- tup p@(_, _) = p- foo :: [Nat] -> [Nat]- foo p@GHC.Types.[] = p- foo p@[_] = p- foo p@(_ GHC.Types.: (_ GHC.Types.: _)) = p- type BazSym3 (t :: Nat) (t :: Nat) (t :: Nat) = Baz t t t- instance SuppressUnusedWarnings BazSym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BazSym2KindInference GHC.Tuple.())- data BazSym2 (l :: Nat) (l :: Nat) (l :: TyFun Nat Baz)- = forall arg. KindOf (Apply (BazSym2 l l) arg) ~ KindOf (BazSym3 l l arg) =>- BazSym2KindInference- type instance Apply (BazSym2 l l) l = BazSym3 l l l- instance SuppressUnusedWarnings BazSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BazSym1KindInference GHC.Tuple.())- data BazSym1 (l :: Nat)- (l :: TyFun Nat (TyFun Nat Baz -> GHC.Types.Type))- = forall arg. KindOf (Apply (BazSym1 l) arg) ~ KindOf (BazSym2 l arg) =>- BazSym1KindInference- type instance Apply (BazSym1 l) l = BazSym2 l l- instance SuppressUnusedWarnings BazSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BazSym0KindInference GHC.Tuple.())- data BazSym0 (l :: TyFun Nat (TyFun Nat (TyFun Nat Baz- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply BazSym0 arg) ~ KindOf (BazSym1 arg) =>- BazSym0KindInference- type instance Apply BazSym0 l = BazSym1 l- type Let0123456789PSym0 = Let0123456789P- type family Let0123456789P where- Let0123456789P = '[]- type Let0123456789PSym1 t = Let0123456789P t- instance SuppressUnusedWarnings Let0123456789PSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789PSym0KindInference GHC.Tuple.())- data Let0123456789PSym0 l- = forall arg. KindOf (Apply Let0123456789PSym0 arg) ~ KindOf (Let0123456789PSym1 arg) =>- Let0123456789PSym0KindInference- type instance Apply Let0123456789PSym0 l = Let0123456789PSym1 l- type family Let0123456789P wild_0123456789 where- Let0123456789P wild_0123456789 = Apply (Apply (:$) wild_0123456789) '[]- type Let0123456789PSym3 t t t = Let0123456789P t t t- instance SuppressUnusedWarnings Let0123456789PSym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789PSym2KindInference GHC.Tuple.())- data Let0123456789PSym2 l l l- = forall arg. KindOf (Apply (Let0123456789PSym2 l l) arg) ~ KindOf (Let0123456789PSym3 l l arg) =>- Let0123456789PSym2KindInference- type instance Apply (Let0123456789PSym2 l l) l = Let0123456789PSym3 l l l- instance SuppressUnusedWarnings Let0123456789PSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789PSym1KindInference GHC.Tuple.())- data Let0123456789PSym1 l l- = forall arg. KindOf (Apply (Let0123456789PSym1 l) arg) ~ KindOf (Let0123456789PSym2 l arg) =>- Let0123456789PSym1KindInference- type instance Apply (Let0123456789PSym1 l) l = Let0123456789PSym2 l l- instance SuppressUnusedWarnings Let0123456789PSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789PSym0KindInference GHC.Tuple.())- data Let0123456789PSym0 l- = forall arg. KindOf (Apply Let0123456789PSym0 arg) ~ KindOf (Let0123456789PSym1 arg) =>- Let0123456789PSym0KindInference- type instance Apply Let0123456789PSym0 l = Let0123456789PSym1 l- type family Let0123456789P wild_0123456789- wild_0123456789- wild_0123456789 where- Let0123456789P wild_0123456789 wild_0123456789 wild_0123456789 = Apply (Apply (:$) wild_0123456789) (Apply (Apply (:$) wild_0123456789) wild_0123456789)- type Let0123456789PSym2 t t = Let0123456789P t t- instance SuppressUnusedWarnings Let0123456789PSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789PSym1KindInference GHC.Tuple.())- data Let0123456789PSym1 l l- = forall arg. KindOf (Apply (Let0123456789PSym1 l) arg) ~ KindOf (Let0123456789PSym2 l arg) =>- Let0123456789PSym1KindInference- type instance Apply (Let0123456789PSym1 l) l = Let0123456789PSym2 l l- instance SuppressUnusedWarnings Let0123456789PSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789PSym0KindInference GHC.Tuple.())- data Let0123456789PSym0 l- = forall arg. KindOf (Apply Let0123456789PSym0 arg) ~ KindOf (Let0123456789PSym1 arg) =>- Let0123456789PSym0KindInference- type instance Apply Let0123456789PSym0 l = Let0123456789PSym1 l- type family Let0123456789P wild_0123456789 wild_0123456789 where- Let0123456789P wild_0123456789 wild_0123456789 = Apply (Apply Tuple2Sym0 wild_0123456789) wild_0123456789- type Let0123456789PSym0 = Let0123456789P- type family Let0123456789P where- Let0123456789P = NothingSym0- type Let0123456789PSym3 t t t = Let0123456789P t t t- instance SuppressUnusedWarnings Let0123456789PSym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789PSym2KindInference GHC.Tuple.())- data Let0123456789PSym2 l l l- = forall arg. KindOf (Apply (Let0123456789PSym2 l l) arg) ~ KindOf (Let0123456789PSym3 l l arg) =>- Let0123456789PSym2KindInference- type instance Apply (Let0123456789PSym2 l l) l = Let0123456789PSym3 l l l- instance SuppressUnusedWarnings Let0123456789PSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789PSym1KindInference GHC.Tuple.())- data Let0123456789PSym1 l l- = forall arg. KindOf (Apply (Let0123456789PSym1 l) arg) ~ KindOf (Let0123456789PSym2 l arg) =>- Let0123456789PSym1KindInference- type instance Apply (Let0123456789PSym1 l) l = Let0123456789PSym2 l l- instance SuppressUnusedWarnings Let0123456789PSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789PSym0KindInference GHC.Tuple.())- data Let0123456789PSym0 l- = forall arg. KindOf (Apply Let0123456789PSym0 arg) ~ KindOf (Let0123456789PSym1 arg) =>- Let0123456789PSym0KindInference- type instance Apply Let0123456789PSym0 l = Let0123456789PSym1 l- type family Let0123456789P wild_0123456789- wild_0123456789- wild_0123456789 where- Let0123456789P wild_0123456789 wild_0123456789 wild_0123456789 = Apply JustSym0 (Apply (Apply (Apply BazSym0 wild_0123456789) wild_0123456789) wild_0123456789)- type Let0123456789XSym1 t = Let0123456789X t- instance SuppressUnusedWarnings Let0123456789XSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789XSym0KindInference GHC.Tuple.())- data Let0123456789XSym0 l- = forall arg. KindOf (Apply Let0123456789XSym0 arg) ~ KindOf (Let0123456789XSym1 arg) =>- Let0123456789XSym0KindInference- type instance Apply Let0123456789XSym0 l = Let0123456789XSym1 l- type family Let0123456789X wild_0123456789 where- Let0123456789X wild_0123456789 = Apply JustSym0 wild_0123456789- type Let0123456789PSym0 = Let0123456789P- type family Let0123456789P where- Let0123456789P = NothingSym0- type FooSym1 (t :: [Nat]) = Foo t- instance SuppressUnusedWarnings FooSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym0KindInference GHC.Tuple.())- data FooSym0 (l :: TyFun [Nat] [Nat])- = forall arg. KindOf (Apply FooSym0 arg) ~ KindOf (FooSym1 arg) =>- FooSym0KindInference- type instance Apply FooSym0 l = FooSym1 l- type TupSym1 (t :: (Nat, Nat)) = Tup t- instance SuppressUnusedWarnings TupSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) TupSym0KindInference GHC.Tuple.())- data TupSym0 (l :: TyFun (Nat, Nat) (Nat, Nat))- = forall arg. KindOf (Apply TupSym0 arg) ~ KindOf (TupSym1 arg) =>- TupSym0KindInference- type instance Apply TupSym0 l = TupSym1 l- type Baz_Sym1 (t :: Maybe Baz) = Baz_ t- instance SuppressUnusedWarnings Baz_Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Baz_Sym0KindInference GHC.Tuple.())- data Baz_Sym0 (l :: TyFun (Maybe Baz) (Maybe Baz))- = forall arg. KindOf (Apply Baz_Sym0 arg) ~ KindOf (Baz_Sym1 arg) =>- Baz_Sym0KindInference- type instance Apply Baz_Sym0 l = Baz_Sym1 l- type BarSym1 (t :: Maybe Nat) = Bar t- instance SuppressUnusedWarnings BarSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BarSym0KindInference GHC.Tuple.())- data BarSym0 (l :: TyFun (Maybe Nat) (Maybe Nat))- = forall arg. KindOf (Apply BarSym0 arg) ~ KindOf (BarSym1 arg) =>- BarSym0KindInference- type instance Apply BarSym0 l = BarSym1 l- type MaybePlusSym1 (t :: Maybe Nat) = MaybePlus t- instance SuppressUnusedWarnings MaybePlusSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) MaybePlusSym0KindInference GHC.Tuple.())- data MaybePlusSym0 (l :: TyFun (Maybe Nat) (Maybe Nat))- = forall arg. KindOf (Apply MaybePlusSym0 arg) ~ KindOf (MaybePlusSym1 arg) =>- MaybePlusSym0KindInference- type instance Apply MaybePlusSym0 l = MaybePlusSym1 l- type family Foo (a :: [Nat]) :: [Nat] where- Foo '[] = Let0123456789PSym0- Foo '[wild_0123456789] = Let0123456789PSym1 wild_0123456789- Foo ((:) wild_0123456789 ((:) wild_0123456789 wild_0123456789)) = Let0123456789PSym3 wild_0123456789 wild_0123456789 wild_0123456789- type family Tup (a :: (Nat, Nat)) :: (Nat, Nat) where- Tup '(wild_0123456789,- wild_0123456789) = Let0123456789PSym2 wild_0123456789 wild_0123456789- type family Baz_ (a :: Maybe Baz) :: Maybe Baz where- Baz_ Nothing = Let0123456789PSym0- Baz_ (Just (Baz wild_0123456789 wild_0123456789 wild_0123456789)) = Let0123456789PSym3 wild_0123456789 wild_0123456789 wild_0123456789- type family Bar (a :: Maybe Nat) :: Maybe Nat where- Bar (Just wild_0123456789) = Let0123456789XSym1 wild_0123456789- Bar Nothing = NothingSym0- type family MaybePlus (a :: Maybe Nat) :: Maybe Nat where- MaybePlus (Just n) = Apply JustSym0 (Apply (Apply PlusSym0 (Apply SuccSym0 ZeroSym0)) n)- MaybePlus Nothing = Let0123456789PSym0- sFoo ::- forall (t :: [Nat]). Sing t -> Sing (Apply FooSym0 t :: [Nat])- sTup ::- forall (t :: (Nat, Nat)).- Sing t -> Sing (Apply TupSym0 t :: (Nat, Nat))- sBaz_ ::- forall (t :: Maybe Baz).- Sing t -> Sing (Apply Baz_Sym0 t :: Maybe Baz)- sBar ::- forall (t :: Maybe Nat).- Sing t -> Sing (Apply BarSym0 t :: Maybe Nat)- sMaybePlus ::- forall (t :: Maybe Nat).- Sing t -> Sing (Apply MaybePlusSym0 t :: Maybe Nat)- sFoo SNil- = let- lambda :: t ~ '[] => Sing (Apply FooSym0 t :: [Nat])- lambda- = let- sP :: Sing Let0123456789PSym0- sP = SNil- in sP- in lambda- sFoo (SCons sWild_0123456789 SNil)- = let- lambda ::- forall wild_0123456789.- t ~ Apply (Apply (:$) wild_0123456789) '[] =>- Sing wild_0123456789 -> Sing (Apply FooSym0 t :: [Nat])- lambda wild_0123456789- = let- sP :: Sing (Let0123456789PSym1 wild_0123456789)- sP- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) wild_0123456789)- SNil- in sP- in lambda sWild_0123456789- sFoo- (SCons sWild_0123456789 (SCons sWild_0123456789 sWild_0123456789))- = let- lambda ::- forall wild_0123456789 wild_0123456789 wild_0123456789.- t ~ Apply (Apply (:$) wild_0123456789) (Apply (Apply (:$) wild_0123456789) wild_0123456789) =>- Sing wild_0123456789- -> Sing wild_0123456789- -> Sing wild_0123456789 -> Sing (Apply FooSym0 t :: [Nat])- lambda wild_0123456789 wild_0123456789 wild_0123456789- = let- sP ::- Sing (Let0123456789PSym3 wild_0123456789 wild_0123456789 wild_0123456789)- sP- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) wild_0123456789)- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) wild_0123456789)- wild_0123456789)- in sP- in lambda sWild_0123456789 sWild_0123456789 sWild_0123456789- sTup (STuple2 sWild_0123456789 sWild_0123456789)- = let- lambda ::- forall wild_0123456789 wild_0123456789.- t ~ Apply (Apply Tuple2Sym0 wild_0123456789) wild_0123456789 =>- Sing wild_0123456789- -> Sing wild_0123456789 -> Sing (Apply TupSym0 t :: (Nat, Nat))- lambda wild_0123456789 wild_0123456789- = let- sP :: Sing (Let0123456789PSym2 wild_0123456789 wild_0123456789)- sP- = applySing- (applySing- (singFun2 (Proxy :: Proxy Tuple2Sym0) STuple2) wild_0123456789)- wild_0123456789- in sP- in lambda sWild_0123456789 sWild_0123456789- sBaz_ SNothing- = let- lambda :: t ~ NothingSym0 => Sing (Apply Baz_Sym0 t :: Maybe Baz)- lambda- = let- sP :: Sing Let0123456789PSym0- sP = SNothing- in sP- in lambda- sBaz_- (SJust (SBaz sWild_0123456789 sWild_0123456789 sWild_0123456789))- = let- lambda ::- forall wild_0123456789 wild_0123456789 wild_0123456789.- t ~ Apply JustSym0 (Apply (Apply (Apply BazSym0 wild_0123456789) wild_0123456789) wild_0123456789) =>- Sing wild_0123456789- -> Sing wild_0123456789- -> Sing wild_0123456789 -> Sing (Apply Baz_Sym0 t :: Maybe Baz)- lambda wild_0123456789 wild_0123456789 wild_0123456789- = let- sP ::- Sing (Let0123456789PSym3 wild_0123456789 wild_0123456789 wild_0123456789)- sP- = applySing- (singFun1 (Proxy :: Proxy JustSym0) SJust)- (applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy BazSym0) SBaz) wild_0123456789)- wild_0123456789)- wild_0123456789)- in sP- in lambda sWild_0123456789 sWild_0123456789 sWild_0123456789- sBar (SJust sWild_0123456789)- = let- lambda ::- forall wild_0123456789.- t ~ Apply JustSym0 wild_0123456789 =>- Sing wild_0123456789 -> Sing (Apply BarSym0 t :: Maybe Nat)- lambda wild_0123456789- = let- sX :: Sing (Let0123456789XSym1 wild_0123456789)- sX- = applySing- (singFun1 (Proxy :: Proxy JustSym0) SJust) wild_0123456789- in sX- in lambda sWild_0123456789- sBar SNothing- = let- lambda :: t ~ NothingSym0 => Sing (Apply BarSym0 t :: Maybe Nat)- lambda = SNothing- in lambda- sMaybePlus (SJust sN)- = let- lambda ::- forall n.- t ~ Apply JustSym0 n =>- Sing n -> Sing (Apply MaybePlusSym0 t :: Maybe Nat)- lambda n- = applySing- (singFun1 (Proxy :: Proxy JustSym0) SJust)- (applySing- (applySing- (singFun2 (Proxy :: Proxy PlusSym0) sPlus)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- n)- in lambda sN- sMaybePlus SNothing- = let- lambda ::- t ~ NothingSym0 => Sing (Apply MaybePlusSym0 t :: Maybe Nat)- lambda- = let- sP :: Sing Let0123456789PSym0- sP = SNothing- in sP- in lambda- data instance Sing (z :: Baz)- = forall (n :: Nat) (n :: Nat) (n :: Nat). z ~ Baz n n n =>- SBaz (Sing (n :: Nat)) (Sing (n :: Nat)) (Sing (n :: Nat))- type SBaz = (Sing :: Baz -> GHC.Types.Type)- instance SingKind Baz where- type DemoteRep Baz = Baz- fromSing (SBaz b b b) = Baz (fromSing b) (fromSing b) (fromSing b)- toSing (Baz b b b)- = case- GHC.Tuple.(,,)- (toSing b :: SomeSing Nat)- (toSing b :: SomeSing Nat)- (toSing b :: SomeSing Nat)- of {- GHC.Tuple.(,,) (SomeSing c) (SomeSing c) (SomeSing c)- -> SomeSing (SBaz c c c) }- instance (SingI n, SingI n, SingI n) =>- SingI (Baz (n :: Nat) (n :: Nat) (n :: Nat)) where- sing = SBaz sing sing sing
+ tests/compile-and-dump/Singletons/AsPattern.ghc82.template view
@@ -0,0 +1,347 @@+Singletons/AsPattern.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| maybePlus :: Maybe Nat -> Maybe Nat+ maybePlus (Just n) = Just (plus (Succ Zero) n)+ maybePlus p@Nothing = p+ bar :: Maybe Nat -> Maybe Nat+ bar x@(Just _) = x+ bar Nothing = Nothing+ baz_ :: Maybe Baz -> Maybe Baz+ baz_ p@Nothing = p+ baz_ p@(Just (Baz _ _ _)) = p+ tup :: (Nat, Nat) -> (Nat, Nat)+ tup p@(_, _) = p+ foo :: [Nat] -> [Nat]+ foo p@[] = p+ foo p@[_] = p+ foo p@(_ : _ : _) = p+ + data Baz = Baz Nat Nat Nat |]+ ======>+ maybePlus :: Maybe Nat -> Maybe Nat+ maybePlus (Just n) = Just ((plus (Succ Zero)) n)+ maybePlus p@Nothing = p+ bar :: Maybe Nat -> Maybe Nat+ bar x@Just _ = x+ bar Nothing = Nothing+ data Baz = Baz Nat Nat Nat+ baz_ :: Maybe Baz -> Maybe Baz+ baz_ p@Nothing = p+ baz_ p@Just (Baz _ _ _) = p+ tup :: (Nat, Nat) -> (Nat, Nat)+ tup p@(_, _) = p+ foo :: [Nat] -> [Nat]+ foo p@GHC.Types.[] = p+ foo p@[_] = p+ foo p@(_ GHC.Types.: (_ GHC.Types.: _)) = p+ type BazSym3 (t :: Nat) (t :: Nat) (t :: Nat) = Baz t t t+ instance SuppressUnusedWarnings BazSym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BazSym2KindInference) GHC.Tuple.())+ data BazSym2 (l :: Nat) (l :: Nat) (l :: TyFun Nat Baz)+ = forall arg. SameKind (Apply (BazSym2 l l) arg) (BazSym3 l l arg) =>+ BazSym2KindInference+ type instance Apply (BazSym2 l l) l = Baz l l l+ instance SuppressUnusedWarnings BazSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BazSym1KindInference) GHC.Tuple.())+ data BazSym1 (l :: Nat) (l :: TyFun Nat (TyFun Nat Baz+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (BazSym1 l) arg) (BazSym2 l arg) =>+ BazSym1KindInference+ type instance Apply (BazSym1 l) l = BazSym2 l l+ instance SuppressUnusedWarnings BazSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BazSym0KindInference) GHC.Tuple.())+ data BazSym0 (l :: TyFun Nat (TyFun Nat (TyFun Nat Baz+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) =>+ BazSym0KindInference+ type instance Apply BazSym0 l = BazSym1 l+ type Let0123456789876543210PSym0 = Let0123456789876543210P+ type family Let0123456789876543210P where+ = '[]+ type Let0123456789876543210PSym1 t = Let0123456789876543210P t+ instance SuppressUnusedWarnings Let0123456789876543210PSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210PSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210PSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>+ Let0123456789876543210PSym0KindInference+ type instance Apply Let0123456789876543210PSym0 l = Let0123456789876543210P l+ type family Let0123456789876543210P wild_0123456789876543210 where+ Let0123456789876543210P wild_0123456789876543210 = Apply (Apply (:$) wild_0123456789876543210) '[]+ type Let0123456789876543210PSym3 t t t =+ Let0123456789876543210P t t t+ instance SuppressUnusedWarnings Let0123456789876543210PSym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210PSym2KindInference)+ GHC.Tuple.())+ data Let0123456789876543210PSym2 l l l+ = forall arg. SameKind (Apply (Let0123456789876543210PSym2 l l) arg) (Let0123456789876543210PSym3 l l arg) =>+ Let0123456789876543210PSym2KindInference+ type instance Apply (Let0123456789876543210PSym2 l l) l = Let0123456789876543210P l l l+ instance SuppressUnusedWarnings Let0123456789876543210PSym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210PSym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210PSym1 l l+ = forall arg. SameKind (Apply (Let0123456789876543210PSym1 l) arg) (Let0123456789876543210PSym2 l arg) =>+ Let0123456789876543210PSym1KindInference+ type instance Apply (Let0123456789876543210PSym1 l) l = Let0123456789876543210PSym2 l l+ instance SuppressUnusedWarnings Let0123456789876543210PSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210PSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210PSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>+ Let0123456789876543210PSym0KindInference+ type instance Apply Let0123456789876543210PSym0 l = Let0123456789876543210PSym1 l+ type family Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 where+ Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 = Apply (Apply (:$) wild_0123456789876543210) (Apply (Apply (:$) wild_0123456789876543210) wild_0123456789876543210)+ type Let0123456789876543210PSym2 t t = Let0123456789876543210P t t+ instance SuppressUnusedWarnings Let0123456789876543210PSym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210PSym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210PSym1 l l+ = forall arg. SameKind (Apply (Let0123456789876543210PSym1 l) arg) (Let0123456789876543210PSym2 l arg) =>+ Let0123456789876543210PSym1KindInference+ type instance Apply (Let0123456789876543210PSym1 l) l = Let0123456789876543210P l l+ instance SuppressUnusedWarnings Let0123456789876543210PSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210PSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210PSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>+ Let0123456789876543210PSym0KindInference+ type instance Apply Let0123456789876543210PSym0 l = Let0123456789876543210PSym1 l+ type family Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 where+ Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 = Apply (Apply Tuple2Sym0 wild_0123456789876543210) wild_0123456789876543210+ type Let0123456789876543210PSym0 = Let0123456789876543210P+ type family Let0123456789876543210P where+ = NothingSym0+ type Let0123456789876543210PSym3 t t t =+ Let0123456789876543210P t t t+ instance SuppressUnusedWarnings Let0123456789876543210PSym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210PSym2KindInference)+ GHC.Tuple.())+ data Let0123456789876543210PSym2 l l l+ = forall arg. SameKind (Apply (Let0123456789876543210PSym2 l l) arg) (Let0123456789876543210PSym3 l l arg) =>+ Let0123456789876543210PSym2KindInference+ type instance Apply (Let0123456789876543210PSym2 l l) l = Let0123456789876543210P l l l+ instance SuppressUnusedWarnings Let0123456789876543210PSym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210PSym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210PSym1 l l+ = forall arg. SameKind (Apply (Let0123456789876543210PSym1 l) arg) (Let0123456789876543210PSym2 l arg) =>+ Let0123456789876543210PSym1KindInference+ type instance Apply (Let0123456789876543210PSym1 l) l = Let0123456789876543210PSym2 l l+ instance SuppressUnusedWarnings Let0123456789876543210PSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210PSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210PSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>+ Let0123456789876543210PSym0KindInference+ type instance Apply Let0123456789876543210PSym0 l = Let0123456789876543210PSym1 l+ type family Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 where+ Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 = Apply JustSym0 (Apply (Apply (Apply BazSym0 wild_0123456789876543210) wild_0123456789876543210) wild_0123456789876543210)+ type Let0123456789876543210XSym1 t = Let0123456789876543210X t+ instance SuppressUnusedWarnings Let0123456789876543210XSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210XSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210XSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) =>+ Let0123456789876543210XSym0KindInference+ type instance Apply Let0123456789876543210XSym0 l = Let0123456789876543210X l+ type family Let0123456789876543210X wild_0123456789876543210 where+ Let0123456789876543210X wild_0123456789876543210 = Apply JustSym0 wild_0123456789876543210+ type Let0123456789876543210PSym0 = Let0123456789876543210P+ type family Let0123456789876543210P where+ = NothingSym0+ type FooSym1 (t :: [Nat]) = Foo t+ instance SuppressUnusedWarnings FooSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym0KindInference) GHC.Tuple.())+ data FooSym0 (l :: TyFun [Nat] [Nat])+ = forall arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>+ FooSym0KindInference+ type instance Apply FooSym0 l = Foo l+ type TupSym1 (t :: (Nat, Nat)) = Tup t+ instance SuppressUnusedWarnings TupSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) TupSym0KindInference) GHC.Tuple.())+ data TupSym0 (l :: TyFun (Nat, Nat) (Nat, Nat))+ = forall arg. SameKind (Apply TupSym0 arg) (TupSym1 arg) =>+ TupSym0KindInference+ type instance Apply TupSym0 l = Tup l+ type Baz_Sym1 (t :: Maybe Baz) = Baz_ t+ instance SuppressUnusedWarnings Baz_Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Baz_Sym0KindInference) GHC.Tuple.())+ data Baz_Sym0 (l :: TyFun (Maybe Baz) (Maybe Baz))+ = forall arg. SameKind (Apply Baz_Sym0 arg) (Baz_Sym1 arg) =>+ Baz_Sym0KindInference+ type instance Apply Baz_Sym0 l = Baz_ l+ type BarSym1 (t :: Maybe Nat) = Bar t+ instance SuppressUnusedWarnings BarSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BarSym0KindInference) GHC.Tuple.())+ data BarSym0 (l :: TyFun (Maybe Nat) (Maybe Nat))+ = forall arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>+ BarSym0KindInference+ type instance Apply BarSym0 l = Bar l+ type MaybePlusSym1 (t :: Maybe Nat) = MaybePlus t+ instance SuppressUnusedWarnings MaybePlusSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) MaybePlusSym0KindInference) GHC.Tuple.())+ data MaybePlusSym0 (l :: TyFun (Maybe Nat) (Maybe Nat))+ = forall arg. SameKind (Apply MaybePlusSym0 arg) (MaybePlusSym1 arg) =>+ MaybePlusSym0KindInference+ type instance Apply MaybePlusSym0 l = MaybePlus l+ type family Foo (a :: [Nat]) :: [Nat] where+ Foo '[] = Let0123456789876543210PSym0+ Foo '[wild_0123456789876543210] = Let0123456789876543210PSym1 wild_0123456789876543210+ Foo ((:) wild_0123456789876543210 ((:) wild_0123456789876543210 wild_0123456789876543210)) = Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210+ type family Tup (a :: (Nat, Nat)) :: (Nat, Nat) where+ Tup '(wild_0123456789876543210,+ wild_0123456789876543210) = Let0123456789876543210PSym2 wild_0123456789876543210 wild_0123456789876543210+ type family Baz_ (a :: Maybe Baz) :: Maybe Baz where+ Baz_ Nothing = Let0123456789876543210PSym0+ Baz_ (Just (Baz wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210)) = Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210+ type family Bar (a :: Maybe Nat) :: Maybe Nat where+ Bar (Just wild_0123456789876543210) = Let0123456789876543210XSym1 wild_0123456789876543210+ Bar Nothing = NothingSym0+ type family MaybePlus (a :: Maybe Nat) :: Maybe Nat where+ MaybePlus (Just n) = Apply JustSym0 (Apply (Apply PlusSym0 (Apply SuccSym0 ZeroSym0)) n)+ MaybePlus Nothing = Let0123456789876543210PSym0+ sFoo ::+ forall (t :: [Nat]). Sing t -> Sing (Apply FooSym0 t :: [Nat])+ sTup ::+ forall (t :: (Nat, Nat)).+ Sing t -> Sing (Apply TupSym0 t :: (Nat, Nat))+ sBaz_ ::+ forall (t :: Maybe Baz).+ Sing t -> Sing (Apply Baz_Sym0 t :: Maybe Baz)+ sBar ::+ forall (t :: Maybe Nat).+ Sing t -> Sing (Apply BarSym0 t :: Maybe Nat)+ sMaybePlus ::+ forall (t :: Maybe Nat).+ Sing t -> Sing (Apply MaybePlusSym0 t :: Maybe Nat)+ sFoo SNil+ = let+ sP :: Sing Let0123456789876543210PSym0+ sP = SNil+ in sP+ sFoo+ (SCons (sWild_0123456789876543210 :: Sing wild_0123456789876543210)+ SNil)+ = let+ sP :: Sing (Let0123456789876543210PSym1 wild_0123456789876543210)+ sP+ = (applySing+ ((applySing ((singFun2 @(:$)) SCons)) sWild_0123456789876543210))+ SNil+ in sP+ sFoo+ (SCons (sWild_0123456789876543210 :: Sing wild_0123456789876543210)+ (SCons (sWild_0123456789876543210 :: Sing wild_0123456789876543210)+ (sWild_0123456789876543210 :: Sing wild_0123456789876543210)))+ = let+ sP ::+ Sing (Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210)+ sP+ = (applySing+ ((applySing ((singFun2 @(:$)) SCons)) sWild_0123456789876543210))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons)) sWild_0123456789876543210))+ sWild_0123456789876543210)+ in sP+ sTup+ (STuple2 (sWild_0123456789876543210 :: Sing wild_0123456789876543210)+ (sWild_0123456789876543210 :: Sing wild_0123456789876543210))+ = let+ sP ::+ Sing (Let0123456789876543210PSym2 wild_0123456789876543210 wild_0123456789876543210)+ sP+ = (applySing+ ((applySing ((singFun2 @Tuple2Sym0) STuple2))+ sWild_0123456789876543210))+ sWild_0123456789876543210+ in sP+ sBaz_ SNothing+ = let+ sP :: Sing Let0123456789876543210PSym0+ sP = SNothing+ in sP+ sBaz_+ (SJust (SBaz (sWild_0123456789876543210 :: Sing wild_0123456789876543210)+ (sWild_0123456789876543210 :: Sing wild_0123456789876543210)+ (sWild_0123456789876543210 :: Sing wild_0123456789876543210)))+ = let+ sP ::+ Sing (Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210)+ sP+ = (applySing ((singFun1 @JustSym0) SJust))+ ((applySing+ ((applySing+ ((applySing ((singFun3 @BazSym0) SBaz)) sWild_0123456789876543210))+ sWild_0123456789876543210))+ sWild_0123456789876543210)+ in sP+ sBar+ (SJust (sWild_0123456789876543210 :: Sing wild_0123456789876543210))+ = let+ sX :: Sing (Let0123456789876543210XSym1 wild_0123456789876543210)+ sX+ = (applySing ((singFun1 @JustSym0) SJust))+ sWild_0123456789876543210+ in sX+ sBar SNothing = SNothing+ sMaybePlus (SJust (sN :: Sing n))+ = (applySing ((singFun1 @JustSym0) SJust))+ ((applySing+ ((applySing ((singFun2 @PlusSym0) sPlus))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ sN)+ sMaybePlus SNothing+ = let+ sP :: Sing Let0123456789876543210PSym0+ sP = SNothing+ in sP+ data instance Sing (z :: Baz)+ = forall (n :: Nat) (n :: Nat) (n :: Nat). z ~ Baz n n n =>+ SBaz (Sing (n :: Nat)) (Sing (n :: Nat)) (Sing (n :: Nat))+ type SBaz = (Sing :: Baz -> GHC.Types.Type)+ instance SingKind Baz where+ type Demote Baz = Baz+ fromSing (SBaz b b b)+ = ((Baz (fromSing b)) (fromSing b)) (fromSing b)+ toSing (Baz b b b)+ = case+ ((GHC.Tuple.(,,) (toSing b :: SomeSing Nat))+ (toSing b :: SomeSing Nat))+ (toSing b :: SomeSing Nat)+ of {+ GHC.Tuple.(,,) (SomeSing c) (SomeSing c) (SomeSing c)+ -> SomeSing (((SBaz c) c) c) }+ instance (SingI n, SingI n, SingI n) =>+ SingI (Baz (n :: Nat) (n :: Nat) (n :: Nat)) where+ sing = ((SBaz sing) sing) sing
− tests/compile-and-dump/Singletons/BadBoundedDeriving.ghc80.template
@@ -1,3 +0,0 @@--Singletons/BadBoundedDeriving.hs:0:0: error:- Can't derive Bounded instance for Foo_0 a_1.
+ tests/compile-and-dump/Singletons/BadBoundedDeriving.ghc82.template view
@@ -0,0 +1,6 @@++Singletons/BadBoundedDeriving.hs:0:0: error:+ Can't derive Bounded instance for Foo_0 a_1.+ |+6 | $(singletons [d|+ | ^^^^^^^^^^^^^^...
− tests/compile-and-dump/Singletons/BadEnumDeriving.ghc80.template
@@ -1,3 +0,0 @@--Singletons/BadEnumDeriving.hs:0:0: error:- Can't derive Enum instance for Foo_0 a_1.
+ tests/compile-and-dump/Singletons/BadEnumDeriving.ghc82.template view
@@ -0,0 +1,6 @@++Singletons/BadEnumDeriving.hs:0:0: error:+ Can't derive Enum instance for Foo_0 a_1.+ |+5 | $(singletons [d|+ | ^^^^^^^^^^^^^^...
− tests/compile-and-dump/Singletons/BoundedDeriving.ghc80.template
@@ -1,259 +0,0 @@-Singletons/BoundedDeriving.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| data Foo1- = Foo1- deriving (Bounded)- data Foo2- = A | B | C | D | E- deriving (Bounded)- data Foo3 a- = Foo3 a- deriving (Bounded)- data Foo4 (a :: *) (b :: *)- = Foo41 | Foo42- deriving (Bounded)- data Pair- = Pair Bool Bool- deriving (Bounded) |]- ======>- data Foo1- = Foo1- deriving (Bounded)- data Foo2- = A | B | C | D | E- deriving (Bounded)- data Foo3 a- = Foo3 a- deriving (Bounded)- data Foo4 (a :: Type) (b :: Type)- = Foo41 | Foo42- deriving (Bounded)- data Pair- = Pair Bool Bool- deriving (Bounded)- type Foo1Sym0 = Foo1- type ASym0 = A- type BSym0 = B- type CSym0 = C- type DSym0 = D- type ESym0 = E- type Foo3Sym1 (t :: a0123456789) = Foo3 t- instance SuppressUnusedWarnings Foo3Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo3Sym0KindInference GHC.Tuple.())- data Foo3Sym0 (l :: TyFun a0123456789 (Foo3 a0123456789))- = forall arg. KindOf (Apply Foo3Sym0 arg) ~ KindOf (Foo3Sym1 arg) =>- Foo3Sym0KindInference- type instance Apply Foo3Sym0 l = Foo3Sym1 l- type Foo41Sym0 = Foo41- type Foo42Sym0 = Foo42- type PairSym2 (t :: Bool) (t :: Bool) = Pair t t- instance SuppressUnusedWarnings PairSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) PairSym1KindInference GHC.Tuple.())- data PairSym1 (l :: Bool) (l :: TyFun Bool Pair)- = forall arg. KindOf (Apply (PairSym1 l) arg) ~ KindOf (PairSym2 l arg) =>- PairSym1KindInference- type instance Apply (PairSym1 l) l = PairSym2 l l- instance SuppressUnusedWarnings PairSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) PairSym0KindInference GHC.Tuple.())- data PairSym0 (l :: TyFun Bool (TyFun Bool Pair -> Type))- = forall arg. KindOf (Apply PairSym0 arg) ~ KindOf (PairSym1 arg) =>- PairSym0KindInference- type instance Apply PairSym0 l = PairSym1 l- type family MinBound_0123456789 :: Foo1 where- MinBound_0123456789 = Foo1Sym0- type MinBound_0123456789Sym0 = MinBound_0123456789- type family MaxBound_0123456789 :: Foo1 where- MaxBound_0123456789 = Foo1Sym0- type MaxBound_0123456789Sym0 = MaxBound_0123456789- instance PBounded (Proxy :: Proxy Foo1) where- type MinBound = MinBound_0123456789Sym0- type MaxBound = MaxBound_0123456789Sym0- type family MinBound_0123456789 :: Foo2 where- MinBound_0123456789 = ASym0- type MinBound_0123456789Sym0 = MinBound_0123456789- type family MaxBound_0123456789 :: Foo2 where- MaxBound_0123456789 = ESym0- type MaxBound_0123456789Sym0 = MaxBound_0123456789- instance PBounded (Proxy :: Proxy Foo2) where- type MinBound = MinBound_0123456789Sym0- type MaxBound = MaxBound_0123456789Sym0- type family MinBound_0123456789 :: Foo3 a where- MinBound_0123456789 = Apply Foo3Sym0 MinBoundSym0- type MinBound_0123456789Sym0 = MinBound_0123456789- type family MaxBound_0123456789 :: Foo3 a where- MaxBound_0123456789 = Apply Foo3Sym0 MaxBoundSym0- type MaxBound_0123456789Sym0 = MaxBound_0123456789- instance PBounded (Proxy :: Proxy (Foo3 a)) where- type MinBound = MinBound_0123456789Sym0- type MaxBound = MaxBound_0123456789Sym0- type family MinBound_0123456789 :: Foo4 a b where- MinBound_0123456789 = Foo41Sym0- type MinBound_0123456789Sym0 = MinBound_0123456789- type family MaxBound_0123456789 :: Foo4 a b where- MaxBound_0123456789 = Foo42Sym0- type MaxBound_0123456789Sym0 = MaxBound_0123456789- instance PBounded (Proxy :: Proxy (Foo4 a b)) where- type MinBound = MinBound_0123456789Sym0- type MaxBound = MaxBound_0123456789Sym0- type family MinBound_0123456789 :: Pair where- MinBound_0123456789 = Apply (Apply PairSym0 MinBoundSym0) MinBoundSym0- type MinBound_0123456789Sym0 = MinBound_0123456789- type family MaxBound_0123456789 :: Pair where- MaxBound_0123456789 = Apply (Apply PairSym0 MaxBoundSym0) MaxBoundSym0- type MaxBound_0123456789Sym0 = MaxBound_0123456789- instance PBounded (Proxy :: Proxy Pair) where- type MinBound = MinBound_0123456789Sym0- type MaxBound = MaxBound_0123456789Sym0- data instance Sing (z :: Foo1) = z ~ Foo1 => SFoo1- type SFoo1 = (Sing :: Foo1 -> Type)- instance SingKind Foo1 where- type DemoteRep Foo1 = Foo1- fromSing SFoo1 = Foo1- toSing Foo1 = SomeSing SFoo1- data instance Sing (z :: Foo2)- = z ~ A => SA |- z ~ B => SB |- z ~ C => SC |- z ~ D => SD |- z ~ E => SE- type SFoo2 = (Sing :: Foo2 -> Type)- instance SingKind Foo2 where- type DemoteRep Foo2 = Foo2- fromSing SA = A- fromSing SB = B- fromSing SC = C- fromSing SD = D- fromSing SE = E- toSing A = SomeSing SA- toSing B = SomeSing SB- toSing C = SomeSing SC- toSing D = SomeSing SD- toSing E = SomeSing SE- data instance Sing (z :: Foo3 a)- = forall (n :: a). z ~ Foo3 n => SFoo3 (Sing (n :: a))- type SFoo3 = (Sing :: Foo3 a -> Type)- instance SingKind a => SingKind (Foo3 a) where- type DemoteRep (Foo3 a) = Foo3 (DemoteRep a)- fromSing (SFoo3 b) = Foo3 (fromSing b)- toSing (Foo3 b)- = case toSing b :: SomeSing a of {- SomeSing c -> SomeSing (SFoo3 c) }- data instance Sing (z :: Foo4 a b)- = z ~ Foo41 => SFoo41 | z ~ Foo42 => SFoo42- type SFoo4 = (Sing :: Foo4 a b -> Type)- instance (SingKind a, SingKind b) => SingKind (Foo4 a b) where- type DemoteRep (Foo4 a b) = Foo4 (DemoteRep a) (DemoteRep b)- fromSing SFoo41 = Foo41- fromSing SFoo42 = Foo42- toSing Foo41 = SomeSing SFoo41- toSing Foo42 = SomeSing SFoo42- data instance Sing (z :: Pair)- = forall (n :: Bool) (n :: Bool). z ~ Pair n n =>- SPair (Sing (n :: Bool)) (Sing (n :: Bool))- type SPair = (Sing :: Pair -> Type)- instance SingKind Pair where- type DemoteRep Pair = Pair- fromSing (SPair b b) = Pair (fromSing b) (fromSing b)- toSing (Pair b b)- = case- GHC.Tuple.(,)- (toSing b :: SomeSing Bool) (toSing b :: SomeSing Bool)- of {- GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing (SPair c c) }- instance SBounded Foo1 where- sMinBound :: Sing (MinBoundSym0 :: Foo1)- sMaxBound :: Sing (MaxBoundSym0 :: Foo1)- sMinBound- = let- lambda :: Sing (MinBoundSym0 :: Foo1)- lambda = SFoo1- in lambda- sMaxBound- = let- lambda :: Sing (MaxBoundSym0 :: Foo1)- lambda = SFoo1- in lambda- instance SBounded Foo2 where- sMinBound :: Sing (MinBoundSym0 :: Foo2)- sMaxBound :: Sing (MaxBoundSym0 :: Foo2)- sMinBound- = let- lambda :: Sing (MinBoundSym0 :: Foo2)- lambda = SA- in lambda- sMaxBound- = let- lambda :: Sing (MaxBoundSym0 :: Foo2)- lambda = SE- in lambda- instance SBounded a => SBounded (Foo3 a) where- sMinBound :: Sing (MinBoundSym0 :: Foo3 a)- sMaxBound :: Sing (MaxBoundSym0 :: Foo3 a)- sMinBound- = let- lambda :: Sing (MinBoundSym0 :: Foo3 a)- lambda- = applySing (singFun1 (Proxy :: Proxy Foo3Sym0) SFoo3) sMinBound- in lambda- sMaxBound- = let- lambda :: Sing (MaxBoundSym0 :: Foo3 a)- lambda- = applySing (singFun1 (Proxy :: Proxy Foo3Sym0) SFoo3) sMaxBound- in lambda- instance SBounded (Foo4 a b) where- sMinBound :: Sing (MinBoundSym0 :: Foo4 a b)- sMaxBound :: Sing (MaxBoundSym0 :: Foo4 a b)- sMinBound- = let- lambda :: Sing (MinBoundSym0 :: Foo4 a b)- lambda = SFoo41- in lambda- sMaxBound- = let- lambda :: Sing (MaxBoundSym0 :: Foo4 a b)- lambda = SFoo42- in lambda- instance SBounded Bool => SBounded Pair where- sMinBound :: Sing (MinBoundSym0 :: Pair)- sMaxBound :: Sing (MaxBoundSym0 :: Pair)- sMinBound- = let- lambda :: Sing (MinBoundSym0 :: Pair)- lambda- = applySing- (applySing (singFun2 (Proxy :: Proxy PairSym0) SPair) sMinBound)- sMinBound- in lambda- sMaxBound- = let- lambda :: Sing (MaxBoundSym0 :: Pair)- lambda- = applySing- (applySing (singFun2 (Proxy :: Proxy PairSym0) SPair) sMaxBound)- sMaxBound- in lambda- instance SingI Foo1 where- sing = SFoo1- instance SingI A where- sing = SA- instance SingI B where- sing = SB- instance SingI C where- sing = SC- instance SingI D where- sing = SD- instance SingI E where- sing = SE- instance SingI n => SingI (Foo3 (n :: a)) where- sing = SFoo3 sing- instance SingI Foo41 where- sing = SFoo41- instance SingI Foo42 where- sing = SFoo42- instance (SingI n, SingI n) =>- SingI (Pair (n :: Bool) (n :: Bool)) where- sing = SPair sing sing
+ tests/compile-and-dump/Singletons/BoundedDeriving.ghc82.template view
@@ -0,0 +1,225 @@+Singletons/BoundedDeriving.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| data Foo1+ = Foo1+ deriving Bounded+ data Foo2+ = A | B | C | D | E+ deriving Bounded+ data Foo3 a+ = Foo3 a+ deriving Bounded+ data Foo4 (a :: *) (b :: *)+ = Foo41 | Foo42+ deriving Bounded+ data Pair+ = Pair Bool Bool+ deriving Bounded |]+ ======>+ data Foo1+ = Foo1+ deriving Bounded+ data Foo2+ = A | B | C | D | E+ deriving Bounded+ data Foo3 a+ = Foo3 a+ deriving Bounded+ data Foo4 (a :: Type) (b :: Type)+ = Foo41 | Foo42+ deriving Bounded+ data Pair+ = Pair Bool Bool+ deriving Bounded+ type Foo1Sym0 = Foo1+ type ASym0 = A+ type BSym0 = B+ type CSym0 = C+ type DSym0 = D+ type ESym0 = E+ type Foo3Sym1 (t :: a0123456789876543210) = Foo3 t+ instance SuppressUnusedWarnings Foo3Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo3Sym0KindInference) GHC.Tuple.())+ data Foo3Sym0 (l :: TyFun a0123456789876543210 (Foo3 a0123456789876543210))+ = forall arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>+ Foo3Sym0KindInference+ type instance Apply Foo3Sym0 l = Foo3 l+ type Foo41Sym0 = Foo41+ type Foo42Sym0 = Foo42+ type PairSym2 (t :: Bool) (t :: Bool) = Pair t t+ instance SuppressUnusedWarnings PairSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) PairSym1KindInference) GHC.Tuple.())+ data PairSym1 (l :: Bool) (l :: TyFun Bool Pair)+ = forall arg. SameKind (Apply (PairSym1 l) arg) (PairSym2 l arg) =>+ PairSym1KindInference+ type instance Apply (PairSym1 l) l = Pair l l+ instance SuppressUnusedWarnings PairSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) PairSym0KindInference) GHC.Tuple.())+ data PairSym0 (l :: TyFun Bool (TyFun Bool Pair -> Type))+ = forall arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) =>+ PairSym0KindInference+ type instance Apply PairSym0 l = PairSym1 l+ type family MinBound_0123456789876543210 :: Foo1 where+ = Foo1Sym0+ type MinBound_0123456789876543210Sym0 =+ MinBound_0123456789876543210+ type family MaxBound_0123456789876543210 :: Foo1 where+ = Foo1Sym0+ type MaxBound_0123456789876543210Sym0 =+ MaxBound_0123456789876543210+ instance PBounded Foo1 where+ type = MinBound_0123456789876543210Sym0+ type = MaxBound_0123456789876543210Sym0+ type family MinBound_0123456789876543210 :: Foo2 where+ = ASym0+ type MinBound_0123456789876543210Sym0 =+ MinBound_0123456789876543210+ type family MaxBound_0123456789876543210 :: Foo2 where+ = ESym0+ type MaxBound_0123456789876543210Sym0 =+ MaxBound_0123456789876543210+ instance PBounded Foo2 where+ type = MinBound_0123456789876543210Sym0+ type = MaxBound_0123456789876543210Sym0+ type family MinBound_0123456789876543210 :: Foo3 a where+ = Apply Foo3Sym0 MinBoundSym0+ type MinBound_0123456789876543210Sym0 =+ MinBound_0123456789876543210+ type family MaxBound_0123456789876543210 :: Foo3 a where+ = Apply Foo3Sym0 MaxBoundSym0+ type MaxBound_0123456789876543210Sym0 =+ MaxBound_0123456789876543210+ instance PBounded (Foo3 a) where+ type = MinBound_0123456789876543210Sym0+ type = MaxBound_0123456789876543210Sym0+ type family MinBound_0123456789876543210 :: Foo4 a b where+ = Foo41Sym0+ type MinBound_0123456789876543210Sym0 =+ MinBound_0123456789876543210+ type family MaxBound_0123456789876543210 :: Foo4 a b where+ = Foo42Sym0+ type MaxBound_0123456789876543210Sym0 =+ MaxBound_0123456789876543210+ instance PBounded (Foo4 a b) where+ type = MinBound_0123456789876543210Sym0+ type = MaxBound_0123456789876543210Sym0+ type family MinBound_0123456789876543210 :: Pair where+ = Apply (Apply PairSym0 MinBoundSym0) MinBoundSym0+ type MinBound_0123456789876543210Sym0 =+ MinBound_0123456789876543210+ type family MaxBound_0123456789876543210 :: Pair where+ = Apply (Apply PairSym0 MaxBoundSym0) MaxBoundSym0+ type MaxBound_0123456789876543210Sym0 =+ MaxBound_0123456789876543210+ instance PBounded Pair where+ type = MinBound_0123456789876543210Sym0+ type = MaxBound_0123456789876543210Sym0+ data instance Sing (z :: Foo1) = z ~ Foo1 => SFoo1+ type SFoo1 = (Sing :: Foo1 -> Type)+ instance SingKind Foo1 where+ type Demote Foo1 = Foo1+ fromSing SFoo1 = Foo1+ toSing Foo1 = SomeSing SFoo1+ data instance Sing (z :: Foo2)+ = z ~ A => SA |+ z ~ B => SB |+ z ~ C => SC |+ z ~ D => SD |+ z ~ E => SE+ type SFoo2 = (Sing :: Foo2 -> Type)+ instance SingKind Foo2 where+ type Demote Foo2 = Foo2+ fromSing SA = A+ fromSing SB = B+ fromSing SC = C+ fromSing SD = D+ fromSing SE = E+ toSing A = SomeSing SA+ toSing B = SomeSing SB+ toSing C = SomeSing SC+ toSing D = SomeSing SD+ toSing E = SomeSing SE+ data instance Sing (z :: Foo3 a)+ = forall (n :: a). z ~ Foo3 n => SFoo3 (Sing (n :: a))+ type SFoo3 = (Sing :: Foo3 a -> Type)+ instance SingKind a => SingKind (Foo3 a) where+ type Demote (Foo3 a) = Foo3 (Demote a)+ fromSing (SFoo3 b) = Foo3 (fromSing b)+ toSing (Foo3 b)+ = case toSing b :: SomeSing a of {+ SomeSing c -> SomeSing (SFoo3 c) }+ data instance Sing (z :: Foo4 a b)+ = z ~ Foo41 => SFoo41 | z ~ Foo42 => SFoo42+ type SFoo4 = (Sing :: Foo4 a b -> Type)+ instance (SingKind a, SingKind b) => SingKind (Foo4 a b) where+ type Demote (Foo4 a b) = Foo4 (Demote a) (Demote b)+ fromSing SFoo41 = Foo41+ fromSing SFoo42 = Foo42+ toSing Foo41 = SomeSing SFoo41+ toSing Foo42 = SomeSing SFoo42+ data instance Sing (z :: Pair)+ = forall (n :: Bool) (n :: Bool). z ~ Pair n n =>+ SPair (Sing (n :: Bool)) (Sing (n :: Bool))+ type SPair = (Sing :: Pair -> Type)+ instance SingKind Pair where+ type Demote Pair = Pair+ fromSing (SPair b b) = (Pair (fromSing b)) (fromSing b)+ toSing (Pair b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing Bool))+ (toSing b :: SomeSing Bool)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing ((SPair c) c) }+ instance SBounded Foo1 where+ sMinBound :: Sing (MinBoundSym0 :: Foo1)+ sMaxBound :: Sing (MaxBoundSym0 :: Foo1)+ sMinBound = SFoo1+ sMaxBound = SFoo1+ instance SBounded Foo2 where+ sMinBound :: Sing (MinBoundSym0 :: Foo2)+ sMaxBound :: Sing (MaxBoundSym0 :: Foo2)+ sMinBound = SA+ sMaxBound = SE+ instance SBounded a => SBounded (Foo3 a) where+ sMinBound :: Sing (MinBoundSym0 :: Foo3 a)+ sMaxBound :: Sing (MaxBoundSym0 :: Foo3 a)+ sMinBound = (applySing ((singFun1 @Foo3Sym0) SFoo3)) sMinBound+ sMaxBound = (applySing ((singFun1 @Foo3Sym0) SFoo3)) sMaxBound+ instance SBounded (Foo4 a b) where+ sMinBound :: Sing (MinBoundSym0 :: Foo4 a b)+ sMaxBound :: Sing (MaxBoundSym0 :: Foo4 a b)+ sMinBound = SFoo41+ sMaxBound = SFoo42+ instance SBounded Bool => SBounded Pair where+ sMinBound :: Sing (MinBoundSym0 :: Pair)+ sMaxBound :: Sing (MaxBoundSym0 :: Pair)+ sMinBound+ = (applySing ((applySing ((singFun2 @PairSym0) SPair)) sMinBound))+ sMinBound+ sMaxBound+ = (applySing ((applySing ((singFun2 @PairSym0) SPair)) sMaxBound))+ sMaxBound+ instance SingI Foo1 where+ sing = SFoo1+ instance SingI A where+ sing = SA+ instance SingI B where+ sing = SB+ instance SingI C where+ sing = SC+ instance SingI D where+ sing = SD+ instance SingI E where+ sing = SE+ instance SingI n => SingI (Foo3 (n :: a)) where+ sing = SFoo3 sing+ instance SingI Foo41 where+ sing = SFoo41+ instance SingI Foo42 where+ sing = SFoo42+ instance (SingI n, SingI n) =>+ SingI (Pair (n :: Bool) (n :: Bool)) where+ sing = (SPair sing) sing
− tests/compile-and-dump/Singletons/BoxUnBox.ghc80.template
@@ -1,48 +0,0 @@-Singletons/BoxUnBox.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| unBox :: Box a -> a- unBox (FBox a) = a- - data Box a = FBox a |]- ======>- data Box a = FBox a- unBox :: forall a. Box a -> a- unBox (FBox a) = a- type FBoxSym1 (t :: a0123456789) = FBox t- instance SuppressUnusedWarnings FBoxSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FBoxSym0KindInference GHC.Tuple.())- data FBoxSym0 (l :: TyFun a0123456789 (Box a0123456789))- = forall arg. KindOf (Apply FBoxSym0 arg) ~ KindOf (FBoxSym1 arg) =>- FBoxSym0KindInference- type instance Apply FBoxSym0 l = FBoxSym1 l- type UnBoxSym1 (t :: Box a0123456789) = UnBox t- instance SuppressUnusedWarnings UnBoxSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) UnBoxSym0KindInference GHC.Tuple.())- data UnBoxSym0 (l :: TyFun (Box a0123456789) a0123456789)- = forall arg. KindOf (Apply UnBoxSym0 arg) ~ KindOf (UnBoxSym1 arg) =>- UnBoxSym0KindInference- type instance Apply UnBoxSym0 l = UnBoxSym1 l- type family UnBox (a :: Box a) :: a where- UnBox (FBox a) = a- sUnBox ::- forall (t :: Box a). Sing t -> Sing (Apply UnBoxSym0 t :: a)- sUnBox (SFBox sA)- = let- lambda ::- forall a.- t ~ Apply FBoxSym0 a => Sing a -> Sing (Apply UnBoxSym0 t :: a)- lambda a = a- in lambda sA- data instance Sing (z :: Box a)- = forall (n :: a). z ~ FBox n => SFBox (Sing (n :: a))- type SBox = (Sing :: Box a -> GHC.Types.Type)- instance SingKind a => SingKind (Box a) where- type DemoteRep (Box a) = Box (DemoteRep a)- fromSing (SFBox b) = FBox (fromSing b)- toSing (FBox b)- = case toSing b :: SomeSing a of {- SomeSing c -> SomeSing (SFBox c) }- instance SingI n => SingI (FBox (n :: a)) where- sing = SFBox sing
+ tests/compile-and-dump/Singletons/BoxUnBox.ghc82.template view
@@ -0,0 +1,42 @@+Singletons/BoxUnBox.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| unBox :: Box a -> a+ unBox (FBox a) = a+ + data Box a = FBox a |]+ ======>+ data Box a = FBox a+ unBox :: Box a -> a+ unBox (FBox a) = a+ type FBoxSym1 (t :: a0123456789876543210) = FBox t+ instance SuppressUnusedWarnings FBoxSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FBoxSym0KindInference) GHC.Tuple.())+ data FBoxSym0 (l :: TyFun a0123456789876543210 (Box a0123456789876543210))+ = forall arg. SameKind (Apply FBoxSym0 arg) (FBoxSym1 arg) =>+ FBoxSym0KindInference+ type instance Apply FBoxSym0 l = FBox l+ type UnBoxSym1 (t :: Box a0123456789876543210) = UnBox t+ instance SuppressUnusedWarnings UnBoxSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) UnBoxSym0KindInference) GHC.Tuple.())+ data UnBoxSym0 (l :: TyFun (Box a0123456789876543210) a0123456789876543210)+ = forall arg. SameKind (Apply UnBoxSym0 arg) (UnBoxSym1 arg) =>+ UnBoxSym0KindInference+ type instance Apply UnBoxSym0 l = UnBox l+ type family UnBox (a :: Box a) :: a where+ UnBox (FBox a) = a+ sUnBox ::+ forall (t :: Box a). Sing t -> Sing (Apply UnBoxSym0 t :: a)+ sUnBox (SFBox (sA :: Sing a)) = sA+ data instance Sing (z :: Box a)+ = forall (n :: a). z ~ FBox n => SFBox (Sing (n :: a))+ type SBox = (Sing :: Box a -> GHC.Types.Type)+ instance SingKind a => SingKind (Box a) where+ type Demote (Box a) = Box (Demote a)+ fromSing (SFBox b) = FBox (fromSing b)+ toSing (FBox b)+ = case toSing b :: SomeSing a of {+ SomeSing c -> SomeSing (SFBox c) }+ instance SingI n => SingI (FBox (n :: a)) where+ sing = SFBox sing
− tests/compile-and-dump/Singletons/CaseExpressions.ghc80.template
@@ -1,358 +0,0 @@-Singletons/CaseExpressions.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| foo1 :: a -> Maybe a -> a- foo1 d x- = case x of {- Just y -> y- Nothing -> d }- foo2 :: a -> Maybe a -> a- foo2 d _ = case (Just d) of { Just y -> y }- foo3 :: a -> b -> a- foo3 a b = case (a, b) of { (p, _) -> p }- foo4 :: forall a. a -> a- foo4 x- = case x of {- y -> let- z :: a- z = y- in z }- foo5 :: a -> a- foo5 x = case x of { y -> (\ _ -> x) y } |]- ======>- foo1 :: forall a. a -> Maybe a -> a- foo1 d x- = case x of {- Just y -> y- Nothing -> d }- foo2 :: forall a. a -> Maybe a -> a- foo2 d _ = case Just d of { Just y -> y }- foo3 :: forall a b. a -> b -> a- foo3 a b = case (a, b) of { (p, _) -> p }- foo4 :: forall a. a -> a- foo4 x- = case x of {- y -> let- z :: a- z = y- in z }- foo5 :: forall a. a -> a- foo5 x = case x of { y -> (\ _ -> x) y }- type family Case_0123456789 x y arg_0123456789 t where- Case_0123456789 x y arg_0123456789 _z_0123456789 = x- type family Lambda_0123456789 x y t where- Lambda_0123456789 x y arg_0123456789 = Case_0123456789 x y arg_0123456789 arg_0123456789- type Lambda_0123456789Sym3 t t t = Lambda_0123456789 t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Case_0123456789 x t where- Case_0123456789 x y = Apply (Apply (Apply Lambda_0123456789Sym0 x) y) y- type Let0123456789ZSym2 t t = Let0123456789Z t t- instance SuppressUnusedWarnings Let0123456789ZSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789ZSym1KindInference GHC.Tuple.())- data Let0123456789ZSym1 l l- = forall arg. KindOf (Apply (Let0123456789ZSym1 l) arg) ~ KindOf (Let0123456789ZSym2 l arg) =>- Let0123456789ZSym1KindInference- type instance Apply (Let0123456789ZSym1 l) l = Let0123456789ZSym2 l l- instance SuppressUnusedWarnings Let0123456789ZSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789ZSym0KindInference GHC.Tuple.())- data Let0123456789ZSym0 l- = forall arg. KindOf (Apply Let0123456789ZSym0 arg) ~ KindOf (Let0123456789ZSym1 arg) =>- Let0123456789ZSym0KindInference- type instance Apply Let0123456789ZSym0 l = Let0123456789ZSym1 l- type family Let0123456789Z x y :: a where- Let0123456789Z x y = y- type family Case_0123456789 x t where- Case_0123456789 x y = Let0123456789ZSym2 x y- type Let0123456789Scrutinee_0123456789Sym2 t t =- Let0123456789Scrutinee_0123456789 t t- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym1KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym1 l l- = forall arg. KindOf (Apply (Let0123456789Scrutinee_0123456789Sym1 l) arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym2 l arg) =>- Let0123456789Scrutinee_0123456789Sym1KindInference- type instance Apply (Let0123456789Scrutinee_0123456789Sym1 l) l = Let0123456789Scrutinee_0123456789Sym2 l l- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym0KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym0 l- = forall arg. KindOf (Apply Let0123456789Scrutinee_0123456789Sym0 arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym1 arg) =>- Let0123456789Scrutinee_0123456789Sym0KindInference- type instance Apply Let0123456789Scrutinee_0123456789Sym0 l = Let0123456789Scrutinee_0123456789Sym1 l- type family Let0123456789Scrutinee_0123456789 a b where- Let0123456789Scrutinee_0123456789 a b = Apply (Apply Tuple2Sym0 a) b- type family Case_0123456789 a b t where- Case_0123456789 a b '(p, _z_0123456789) = p- type Let0123456789Scrutinee_0123456789Sym2 t t =- Let0123456789Scrutinee_0123456789 t t- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym1KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym1 l l- = forall arg. KindOf (Apply (Let0123456789Scrutinee_0123456789Sym1 l) arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym2 l arg) =>- Let0123456789Scrutinee_0123456789Sym1KindInference- type instance Apply (Let0123456789Scrutinee_0123456789Sym1 l) l = Let0123456789Scrutinee_0123456789Sym2 l l- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym0KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym0 l- = forall arg. KindOf (Apply Let0123456789Scrutinee_0123456789Sym0 arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym1 arg) =>- Let0123456789Scrutinee_0123456789Sym0KindInference- type instance Apply Let0123456789Scrutinee_0123456789Sym0 l = Let0123456789Scrutinee_0123456789Sym1 l- type family Let0123456789Scrutinee_0123456789 d _z_0123456789 where- Let0123456789Scrutinee_0123456789 d _z_0123456789 = Apply JustSym0 d- type family Case_0123456789 d _z_0123456789 t where- Case_0123456789 d _z_0123456789 (Just y) = y- type family Case_0123456789 d x t where- Case_0123456789 d x (Just y) = y- Case_0123456789 d x Nothing = d- type Foo5Sym1 (t :: a0123456789) = Foo5 t- instance SuppressUnusedWarnings Foo5Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo5Sym0KindInference GHC.Tuple.())- data Foo5Sym0 (l :: TyFun a0123456789 a0123456789)- = forall arg. KindOf (Apply Foo5Sym0 arg) ~ KindOf (Foo5Sym1 arg) =>- Foo5Sym0KindInference- type instance Apply Foo5Sym0 l = Foo5Sym1 l- type Foo4Sym1 (t :: a0123456789) = Foo4 t- instance SuppressUnusedWarnings Foo4Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo4Sym0KindInference GHC.Tuple.())- data Foo4Sym0 (l :: TyFun a0123456789 a0123456789)- = forall arg. KindOf (Apply Foo4Sym0 arg) ~ KindOf (Foo4Sym1 arg) =>- Foo4Sym0KindInference- type instance Apply Foo4Sym0 l = Foo4Sym1 l- type Foo3Sym2 (t :: a0123456789) (t :: b0123456789) = Foo3 t t- instance SuppressUnusedWarnings Foo3Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo3Sym1KindInference GHC.Tuple.())- data Foo3Sym1 (l :: a0123456789)- (l :: TyFun b0123456789 a0123456789)- = forall arg. KindOf (Apply (Foo3Sym1 l) arg) ~ KindOf (Foo3Sym2 l arg) =>- Foo3Sym1KindInference- type instance Apply (Foo3Sym1 l) l = Foo3Sym2 l l- instance SuppressUnusedWarnings Foo3Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo3Sym0KindInference GHC.Tuple.())- data Foo3Sym0 (l :: TyFun a0123456789 (TyFun b0123456789 a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo3Sym0 arg) ~ KindOf (Foo3Sym1 arg) =>- Foo3Sym0KindInference- type instance Apply Foo3Sym0 l = Foo3Sym1 l- type Foo2Sym2 (t :: a0123456789) (t :: Maybe a0123456789) =- Foo2 t t- instance SuppressUnusedWarnings Foo2Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo2Sym1KindInference GHC.Tuple.())- data Foo2Sym1 (l :: a0123456789)- (l :: TyFun (Maybe a0123456789) a0123456789)- = forall arg. KindOf (Apply (Foo2Sym1 l) arg) ~ KindOf (Foo2Sym2 l arg) =>- Foo2Sym1KindInference- type instance Apply (Foo2Sym1 l) l = Foo2Sym2 l l- instance SuppressUnusedWarnings Foo2Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo2Sym0KindInference GHC.Tuple.())- data Foo2Sym0 (l :: TyFun a0123456789 (TyFun (Maybe a0123456789) a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo2Sym0 arg) ~ KindOf (Foo2Sym1 arg) =>- Foo2Sym0KindInference- type instance Apply Foo2Sym0 l = Foo2Sym1 l- type Foo1Sym2 (t :: a0123456789) (t :: Maybe a0123456789) =- Foo1 t t- instance SuppressUnusedWarnings Foo1Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo1Sym1KindInference GHC.Tuple.())- data Foo1Sym1 (l :: a0123456789)- (l :: TyFun (Maybe a0123456789) a0123456789)- = forall arg. KindOf (Apply (Foo1Sym1 l) arg) ~ KindOf (Foo1Sym2 l arg) =>- Foo1Sym1KindInference- type instance Apply (Foo1Sym1 l) l = Foo1Sym2 l l- instance SuppressUnusedWarnings Foo1Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo1Sym0KindInference GHC.Tuple.())- data Foo1Sym0 (l :: TyFun a0123456789 (TyFun (Maybe a0123456789) a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo1Sym0 arg) ~ KindOf (Foo1Sym1 arg) =>- Foo1Sym0KindInference- type instance Apply Foo1Sym0 l = Foo1Sym1 l- type family Foo5 (a :: a) :: a where- Foo5 x = Case_0123456789 x x- type family Foo4 (a :: a) :: a where- Foo4 x = Case_0123456789 x x- type family Foo3 (a :: a) (a :: b) :: a where- Foo3 a b = Case_0123456789 a b (Let0123456789Scrutinee_0123456789Sym2 a b)- type family Foo2 (a :: a) (a :: Maybe a) :: a where- Foo2 d _z_0123456789 = Case_0123456789 d _z_0123456789 (Let0123456789Scrutinee_0123456789Sym2 d _z_0123456789)- type family Foo1 (a :: a) (a :: Maybe a) :: a where- Foo1 d x = Case_0123456789 d x x- sFoo5 :: forall (t :: a). Sing t -> Sing (Apply Foo5Sym0 t :: a)- sFoo4 :: forall (t :: a). Sing t -> Sing (Apply Foo4Sym0 t :: a)- sFoo3 ::- forall (t :: a) (t :: b).- Sing t -> Sing t -> Sing (Apply (Apply Foo3Sym0 t) t :: a)- sFoo2 ::- forall (t :: a) (t :: Maybe a).- Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)- sFoo1 ::- forall (t :: a) (t :: Maybe a).- Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)- sFoo5 sX- = let- lambda :: forall x. t ~ x => Sing x -> Sing (Apply Foo5Sym0 t :: a)- lambda x- = case x of {- sY- -> let- lambda ::- forall y. y ~ x => Sing y -> Sing (Case_0123456789 x y :: a)- lambda y- = applySing- (singFun1- (Proxy :: Proxy (Apply (Apply Lambda_0123456789Sym0 x) y))- (\ sArg_0123456789- -> let- lambda ::- forall arg_0123456789.- Sing arg_0123456789- -> Sing (Apply (Apply (Apply Lambda_0123456789Sym0 x) y) arg_0123456789)- lambda arg_0123456789- = case arg_0123456789 of {- _s_z_0123456789- -> let- lambda ::- forall _z_0123456789.- _z_0123456789 ~ arg_0123456789 =>- Sing _z_0123456789- -> Sing (Case_0123456789 x y arg_0123456789 _z_0123456789)- lambda _z_0123456789 = x- in lambda _s_z_0123456789 } ::- Sing (Case_0123456789 x y arg_0123456789 arg_0123456789)- in lambda sArg_0123456789))- y- in lambda sY } ::- Sing (Case_0123456789 x x :: a)- in lambda sX- sFoo4 sX- = let- lambda :: forall x. t ~ x => Sing x -> Sing (Apply Foo4Sym0 t :: a)- lambda x- = case x of {- sY- -> let- lambda ::- forall y. y ~ x => Sing y -> Sing (Case_0123456789 x y :: a)- lambda y- = let- sZ :: Sing (Let0123456789ZSym2 x y :: a)- sZ = y- in sZ- in lambda sY } ::- Sing (Case_0123456789 x x :: a)- in lambda sX- sFoo3 sA sB- = let- lambda ::- forall a b.- (t ~ a, t ~ b) =>- Sing a -> Sing b -> Sing (Apply (Apply Foo3Sym0 t) t :: a)- lambda a b- = let- sScrutinee_0123456789 ::- Sing (Let0123456789Scrutinee_0123456789Sym2 a b)- sScrutinee_0123456789- = applySing- (applySing (singFun2 (Proxy :: Proxy Tuple2Sym0) STuple2) a) b- in case sScrutinee_0123456789 of {- STuple2 sP _s_z_0123456789- -> let- lambda ::- forall p _z_0123456789.- Apply (Apply Tuple2Sym0 p) _z_0123456789 ~ Let0123456789Scrutinee_0123456789Sym2 a b =>- Sing p- -> Sing _z_0123456789- -> Sing (Case_0123456789 a b (Apply (Apply Tuple2Sym0 p) _z_0123456789) :: a)- lambda p _z_0123456789 = p- in lambda sP _s_z_0123456789 } ::- Sing (Case_0123456789 a b (Let0123456789Scrutinee_0123456789Sym2 a b) :: a)- in lambda sA sB- sFoo2 sD _s_z_0123456789- = let- lambda ::- forall d _z_0123456789.- (t ~ d, t ~ _z_0123456789) =>- Sing d- -> Sing _z_0123456789 -> Sing (Apply (Apply Foo2Sym0 t) t :: a)- lambda d _z_0123456789- = let- sScrutinee_0123456789 ::- Sing (Let0123456789Scrutinee_0123456789Sym2 d _z_0123456789)- sScrutinee_0123456789- = applySing (singFun1 (Proxy :: Proxy JustSym0) SJust) d- in case sScrutinee_0123456789 of {- SJust sY- -> let- lambda ::- forall y.- Apply JustSym0 y ~ Let0123456789Scrutinee_0123456789Sym2 d _z_0123456789 =>- Sing y- -> Sing (Case_0123456789 d _z_0123456789 (Apply JustSym0 y) :: a)- lambda y = y- in lambda sY } ::- Sing (Case_0123456789 d _z_0123456789 (Let0123456789Scrutinee_0123456789Sym2 d _z_0123456789) :: a)- in lambda sD _s_z_0123456789- sFoo1 sD sX- = let- lambda ::- forall d x.- (t ~ d, t ~ x) =>- Sing d -> Sing x -> Sing (Apply (Apply Foo1Sym0 t) t :: a)- lambda d x- = case x of {- SJust sY- -> let- lambda ::- forall y.- Apply JustSym0 y ~ x =>- Sing y -> Sing (Case_0123456789 d x (Apply JustSym0 y) :: a)- lambda y = y- in lambda sY- SNothing- -> let- lambda ::- NothingSym0 ~ x => Sing (Case_0123456789 d x NothingSym0 :: a)- lambda = d- in lambda } ::- Sing (Case_0123456789 d x x :: a)- in lambda sD sX
+ tests/compile-and-dump/Singletons/CaseExpressions.ghc82.template view
@@ -0,0 +1,273 @@+Singletons/CaseExpressions.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| foo1 :: a -> Maybe a -> a+ foo1 d x+ = case x of+ Just y -> y+ Nothing -> d+ foo2 :: a -> Maybe a -> a+ foo2 d _ = case (Just d) of { Just y -> y }+ foo3 :: a -> b -> a+ foo3 a b = case (a, b) of { (p, _) -> p }+ foo4 :: forall a. a -> a+ foo4 x+ = case x of {+ y -> let+ z :: a+ z = y+ in z }+ foo5 :: a -> a+ foo5 x = case x of { y -> (\ _ -> x) y } |]+ ======>+ foo1 :: a -> Maybe a -> a+ foo1 d x+ = case x of+ Just y -> y+ Nothing -> d+ foo2 :: a -> Maybe a -> a+ foo2 d _ = case Just d of { Just y -> y }+ foo3 :: a -> b -> a+ foo3 a b = case (a, b) of { (p, _) -> p }+ foo4 :: forall a. a -> a+ foo4 x+ = case x of {+ y -> let+ z :: a+ z = y+ in z }+ foo5 :: a -> a+ foo5 x = case x of { y -> (\ _ -> x) y }+ type family Case_0123456789876543210 x y arg_0123456789876543210 t where+ Case_0123456789876543210 x y arg_0123456789876543210 _z_0123456789876543210 = x+ type family Lambda_0123456789876543210 x y t where+ Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210+ type Lambda_0123456789876543210Sym3 t t t =+ Lambda_0123456789876543210 t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Case_0123456789876543210 x t where+ Case_0123456789876543210 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y+ type Let0123456789876543210ZSym2 t t = Let0123456789876543210Z t t+ instance SuppressUnusedWarnings Let0123456789876543210ZSym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210ZSym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210ZSym1 l l+ = forall arg. SameKind (Apply (Let0123456789876543210ZSym1 l) arg) (Let0123456789876543210ZSym2 l arg) =>+ Let0123456789876543210ZSym1KindInference+ type instance Apply (Let0123456789876543210ZSym1 l) l = Let0123456789876543210Z l l+ instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210ZSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210ZSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>+ Let0123456789876543210ZSym0KindInference+ type instance Apply Let0123456789876543210ZSym0 l = Let0123456789876543210ZSym1 l+ type family Let0123456789876543210Z x y :: a where+ Let0123456789876543210Z x y = y+ type family Case_0123456789876543210 x t where+ Case_0123456789876543210 x y = Let0123456789876543210ZSym2 x y+ type Let0123456789876543210Scrutinee_0123456789876543210Sym2 t t =+ Let0123456789876543210Scrutinee_0123456789876543210 t t+ instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210Scrutinee_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 l) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym2 l arg) =>+ Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference+ type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 l) l = Let0123456789876543210Scrutinee_0123456789876543210 l l+ instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210Scrutinee_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>+ Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference+ type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 l = Let0123456789876543210Scrutinee_0123456789876543210Sym1 l+ 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, _z_0123456789876543210) = p+ type Let0123456789876543210Scrutinee_0123456789876543210Sym1 t =+ Let0123456789876543210Scrutinee_0123456789876543210 t+ instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210Scrutinee_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>+ Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference+ type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 l = Let0123456789876543210Scrutinee_0123456789876543210 l+ type family Let0123456789876543210Scrutinee_0123456789876543210 d where+ Let0123456789876543210Scrutinee_0123456789876543210 d = Apply JustSym0 d+ type family Case_0123456789876543210 d t where+ Case_0123456789876543210 d (Just y) = y+ type family Case_0123456789876543210 d x t where+ Case_0123456789876543210 d x (Just y) = y+ Case_0123456789876543210 d x Nothing = d+ type Foo5Sym1 (t :: a0123456789876543210) = Foo5 t+ instance SuppressUnusedWarnings Foo5Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo5Sym0KindInference) GHC.Tuple.())+ data Foo5Sym0 (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) =>+ Foo5Sym0KindInference+ type instance Apply Foo5Sym0 l = Foo5 l+ type Foo4Sym1 (t :: a0123456789876543210) = Foo4 t+ instance SuppressUnusedWarnings Foo4Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo4Sym0KindInference) GHC.Tuple.())+ data Foo4Sym0 (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) =>+ Foo4Sym0KindInference+ type instance Apply Foo4Sym0 l = Foo4 l+ type Foo3Sym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Foo3 t t+ instance SuppressUnusedWarnings Foo3Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo3Sym1KindInference) GHC.Tuple.())+ data Foo3Sym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply (Foo3Sym1 l) arg) (Foo3Sym2 l arg) =>+ Foo3Sym1KindInference+ type instance Apply (Foo3Sym1 l) l = Foo3 l l+ instance SuppressUnusedWarnings Foo3Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo3Sym0KindInference) GHC.Tuple.())+ data Foo3Sym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>+ Foo3Sym0KindInference+ type instance Apply Foo3Sym0 l = Foo3Sym1 l+ type Foo2Sym2 (t :: a0123456789876543210) (t :: Maybe a0123456789876543210) =+ Foo2 t t+ instance SuppressUnusedWarnings Foo2Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo2Sym1KindInference) GHC.Tuple.())+ data Foo2Sym1 (l :: a0123456789876543210) (l :: TyFun (Maybe a0123456789876543210) a0123456789876543210)+ = forall arg. SameKind (Apply (Foo2Sym1 l) arg) (Foo2Sym2 l arg) =>+ Foo2Sym1KindInference+ type instance Apply (Foo2Sym1 l) l = Foo2 l l+ instance SuppressUnusedWarnings Foo2Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo2Sym0KindInference) GHC.Tuple.())+ data Foo2Sym0 (l :: TyFun a0123456789876543210 (TyFun (Maybe a0123456789876543210) a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>+ Foo2Sym0KindInference+ type instance Apply Foo2Sym0 l = Foo2Sym1 l+ type Foo1Sym2 (t :: a0123456789876543210) (t :: Maybe a0123456789876543210) =+ Foo1 t t+ instance SuppressUnusedWarnings Foo1Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo1Sym1KindInference) GHC.Tuple.())+ data Foo1Sym1 (l :: a0123456789876543210) (l :: TyFun (Maybe a0123456789876543210) a0123456789876543210)+ = forall arg. SameKind (Apply (Foo1Sym1 l) arg) (Foo1Sym2 l arg) =>+ Foo1Sym1KindInference+ type instance Apply (Foo1Sym1 l) l = Foo1 l l+ instance SuppressUnusedWarnings Foo1Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo1Sym0KindInference) GHC.Tuple.())+ data Foo1Sym0 (l :: TyFun a0123456789876543210 (TyFun (Maybe a0123456789876543210) a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>+ Foo1Sym0KindInference+ type instance Apply Foo1Sym0 l = Foo1Sym1 l+ type family Foo5 (a :: a) :: a where+ Foo5 x = Case_0123456789876543210 x x+ type family Foo4 (a :: a) :: a where+ Foo4 x = Case_0123456789876543210 x x+ type family Foo3 (a :: a) (a :: b) :: a where+ Foo3 a b = Case_0123456789876543210 a b (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a b)+ type family Foo2 (a :: a) (a :: Maybe a) :: a where+ Foo2 d _z_0123456789876543210 = Case_0123456789876543210 d (Let0123456789876543210Scrutinee_0123456789876543210Sym1 d)+ type family Foo1 (a :: a) (a :: Maybe a) :: a where+ Foo1 d x = Case_0123456789876543210 d x x+ sFoo5 :: forall (t :: a). Sing t -> Sing (Apply Foo5Sym0 t :: a)+ sFoo4 :: forall (t :: a). Sing t -> Sing (Apply Foo4Sym0 t :: a)+ sFoo3 ::+ forall (t :: a) (t :: b).+ Sing t -> Sing t -> Sing (Apply (Apply Foo3Sym0 t) t :: a)+ sFoo2 ::+ forall (t :: a) (t :: Maybe a).+ Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)+ sFoo1 ::+ forall (t :: a) (t :: Maybe a).+ Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)+ sFoo5 (sX :: Sing x)+ = case sX of {+ sY :: Sing y+ -> (applySing+ ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 x) y))+ (\ sArg_0123456789876543210+ -> case sArg_0123456789876543210 of {+ _ :: Sing arg_0123456789876543210+ -> case sArg_0123456789876543210 of { _ -> sX } ::+ Sing (Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210) })))+ sY } ::+ Sing (Case_0123456789876543210 x x :: a)+ sFoo4 (sX :: Sing x)+ = case sX of {+ sY :: Sing y+ -> let+ sZ :: Sing (Let0123456789876543210ZSym2 x y :: a)+ sZ = sY+ in sZ } ::+ Sing (Case_0123456789876543210 x x :: a)+ sFoo3 (sA :: Sing a) (sB :: Sing b)+ = let+ sScrutinee_0123456789876543210 ::+ Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a b)+ sScrutinee_0123456789876543210+ = (applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sA)) sB+ in case sScrutinee_0123456789876543210 of {+ STuple2 (sP :: Sing p) _ -> sP } ::+ Sing (Case_0123456789876543210 a b (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a b) :: a)+ sFoo2 (sD :: Sing d) _+ = let+ sScrutinee_0123456789876543210 ::+ Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 d)+ sScrutinee_0123456789876543210+ = (applySing ((singFun1 @JustSym0) SJust)) sD+ in case sScrutinee_0123456789876543210 of {+ SJust (sY :: Sing y) -> sY } ::+ Sing (Case_0123456789876543210 d (Let0123456789876543210Scrutinee_0123456789876543210Sym1 d) :: a)+ sFoo1 (sD :: Sing d) (sX :: Sing x)+ = case sX of+ SJust (sY :: Sing y) -> sY+ SNothing -> sD ::+ Sing (Case_0123456789876543210 d x x :: a)
− tests/compile-and-dump/Singletons/Classes.ghc80.template
@@ -1,657 +0,0 @@-Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| infix 4 <=>- - const :: a -> b -> a- const x _ = x- fooCompare :: Foo -> Foo -> Ordering- fooCompare A A = EQ- fooCompare A B = LT- fooCompare B B = GT- fooCompare B A = EQ- - class MyOrd a where- mycompare :: a -> a -> Ordering- (<=>) :: a -> a -> Ordering- (<=>) = mycompare- infix 4 <=>- data Foo = A | B- data Foo2 = F | G- - instance Eq Foo2 where- F == F = True- G == G = True- F == G = False- G == F = False- instance MyOrd Foo where- mycompare = fooCompare- instance MyOrd () where- mycompare _ = const EQ- instance MyOrd Nat where- Zero `mycompare` Zero = EQ- Zero `mycompare` (Succ _) = LT- (Succ _) `mycompare` Zero = GT- (Succ n) `mycompare` (Succ m) = m `mycompare` n |]- ======>- const :: forall a b. a -> b -> a- const x _ = x- class MyOrd a where- mycompare :: a -> a -> Ordering- (<=>) :: a -> a -> Ordering- (<=>) = mycompare- infix 4 <=>- instance MyOrd Nat where- mycompare Zero Zero = EQ- mycompare Zero (Succ _) = LT- mycompare (Succ _) Zero = GT- mycompare (Succ n) (Succ m) = (m `mycompare` n)- instance MyOrd () where- mycompare _ = const EQ- data Foo = A | B- fooCompare :: Foo -> Foo -> Ordering- fooCompare A A = EQ- fooCompare A B = LT- fooCompare B B = GT- fooCompare B A = EQ- instance MyOrd Foo where- mycompare = fooCompare- data Foo2 = F | G- instance Eq Foo2 where- (==) F F = True- (==) G G = True- (==) F G = False- (==) G F = False- type ASym0 = A- type BSym0 = B- type FSym0 = F- type GSym0 = G- type FooCompareSym2 (t :: Foo) (t :: Foo) = FooCompare t t- instance SuppressUnusedWarnings FooCompareSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooCompareSym1KindInference GHC.Tuple.())- data FooCompareSym1 (l :: Foo) (l :: TyFun Foo Ordering)- = forall arg. KindOf (Apply (FooCompareSym1 l) arg) ~ KindOf (FooCompareSym2 l arg) =>- FooCompareSym1KindInference- type instance Apply (FooCompareSym1 l) l = FooCompareSym2 l l- instance SuppressUnusedWarnings FooCompareSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooCompareSym0KindInference GHC.Tuple.())- data FooCompareSym0 (l :: TyFun Foo (TyFun Foo Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply FooCompareSym0 arg) ~ KindOf (FooCompareSym1 arg) =>- FooCompareSym0KindInference- type instance Apply FooCompareSym0 l = FooCompareSym1 l- type ConstSym2 (t :: a0123456789) (t :: b0123456789) = Const t t- instance SuppressUnusedWarnings ConstSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ConstSym1KindInference GHC.Tuple.())- data ConstSym1 (l :: a0123456789)- (l :: TyFun b0123456789 a0123456789)- = forall arg. KindOf (Apply (ConstSym1 l) arg) ~ KindOf (ConstSym2 l arg) =>- ConstSym1KindInference- type instance Apply (ConstSym1 l) l = ConstSym2 l l- instance SuppressUnusedWarnings ConstSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ConstSym0KindInference GHC.Tuple.())- data ConstSym0 (l :: TyFun a0123456789 (TyFun b0123456789 a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply ConstSym0 arg) ~ KindOf (ConstSym1 arg) =>- ConstSym0KindInference- type instance Apply ConstSym0 l = ConstSym1 l- type family FooCompare (a :: Foo) (a :: Foo) :: Ordering where- FooCompare A A = EQSym0- FooCompare A B = LTSym0- FooCompare B B = GTSym0- FooCompare B A = EQSym0- type family Const (a :: a) (a :: b) :: a where- Const x _z_0123456789 = x- infix 4 :<=>- type MycompareSym2 (t :: a0123456789) (t :: a0123456789) =- Mycompare t t- instance SuppressUnusedWarnings MycompareSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) MycompareSym1KindInference GHC.Tuple.())- data MycompareSym1 (l :: a0123456789)- (l :: TyFun a0123456789 Ordering)- = forall arg. KindOf (Apply (MycompareSym1 l) arg) ~ KindOf (MycompareSym2 l arg) =>- MycompareSym1KindInference- type instance Apply (MycompareSym1 l) l = MycompareSym2 l l- instance SuppressUnusedWarnings MycompareSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) MycompareSym0KindInference GHC.Tuple.())- data MycompareSym0 (l :: TyFun a0123456789 (TyFun a0123456789 Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply MycompareSym0 arg) ~ KindOf (MycompareSym1 arg) =>- MycompareSym0KindInference- type instance Apply MycompareSym0 l = MycompareSym1 l- type (:<=>$$$) (t :: a0123456789) (t :: a0123456789) = (:<=>) t t- instance SuppressUnusedWarnings (:<=>$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<=>$$###) GHC.Tuple.())- data (:<=>$$) (l :: a0123456789) (l :: TyFun a0123456789 Ordering)- = forall arg. KindOf (Apply ((:<=>$$) l) arg) ~ KindOf ((:<=>$$$) l arg) =>- (:<=>$$###)- type instance Apply ((:<=>$$) l) l = (:<=>$$$) l l- instance SuppressUnusedWarnings (:<=>$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<=>$###) GHC.Tuple.())- data (:<=>$) (l :: TyFun a0123456789 (TyFun a0123456789 Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply (:<=>$) arg) ~ KindOf ((:<=>$$) arg) =>- (:<=>$###)- type instance Apply (:<=>$) l = (:<=>$$) l- type family TFHelper_0123456789 (a :: a) (a :: a) :: Ordering where- TFHelper_0123456789 a_0123456789 a_0123456789 = Apply (Apply MycompareSym0 a_0123456789) a_0123456789- type TFHelper_0123456789Sym2 (t :: a0123456789)- (t :: a0123456789) =- TFHelper_0123456789 t t- instance SuppressUnusedWarnings TFHelper_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) TFHelper_0123456789Sym1KindInference GHC.Tuple.())- data TFHelper_0123456789Sym1 (l :: a0123456789)- (l :: TyFun a0123456789 Ordering)- = forall arg. KindOf (Apply (TFHelper_0123456789Sym1 l) arg) ~ KindOf (TFHelper_0123456789Sym2 l arg) =>- TFHelper_0123456789Sym1KindInference- type instance Apply (TFHelper_0123456789Sym1 l) l = TFHelper_0123456789Sym2 l l- instance SuppressUnusedWarnings TFHelper_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) TFHelper_0123456789Sym0KindInference GHC.Tuple.())- data TFHelper_0123456789Sym0 (l :: TyFun a0123456789 (TyFun a0123456789 Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply TFHelper_0123456789Sym0 arg) ~ KindOf (TFHelper_0123456789Sym1 arg) =>- TFHelper_0123456789Sym0KindInference- type instance Apply TFHelper_0123456789Sym0 l = TFHelper_0123456789Sym1 l- class kproxy ~ Proxy => PMyOrd (kproxy :: Proxy a) where- type Mycompare (arg :: a) (arg :: a) :: Ordering- type (:<=>) (arg :: a) (arg :: a) :: Ordering- type (:<=>) a a = Apply (Apply TFHelper_0123456789Sym0 a) a- type family Mycompare_0123456789 (a :: Nat)- (a :: Nat) :: Ordering where- Mycompare_0123456789 Zero Zero = EQSym0- Mycompare_0123456789 Zero (Succ _z_0123456789) = LTSym0- Mycompare_0123456789 (Succ _z_0123456789) Zero = GTSym0- Mycompare_0123456789 (Succ n) (Succ m) = Apply (Apply MycompareSym0 m) n- type Mycompare_0123456789Sym2 (t :: Nat) (t :: Nat) =- Mycompare_0123456789 t t- instance SuppressUnusedWarnings Mycompare_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym1KindInference GHC.Tuple.())- data Mycompare_0123456789Sym1 (l :: Nat) (l :: TyFun Nat Ordering)- = forall arg. KindOf (Apply (Mycompare_0123456789Sym1 l) arg) ~ KindOf (Mycompare_0123456789Sym2 l arg) =>- Mycompare_0123456789Sym1KindInference- type instance Apply (Mycompare_0123456789Sym1 l) l = Mycompare_0123456789Sym2 l l- instance SuppressUnusedWarnings Mycompare_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym0KindInference GHC.Tuple.())- data Mycompare_0123456789Sym0 (l :: TyFun Nat (TyFun Nat Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply Mycompare_0123456789Sym0 arg) ~ KindOf (Mycompare_0123456789Sym1 arg) =>- Mycompare_0123456789Sym0KindInference- type instance Apply Mycompare_0123456789Sym0 l = Mycompare_0123456789Sym1 l- instance PMyOrd (Proxy :: Proxy Nat) where- type Mycompare (a :: Nat) (a :: Nat) = Apply (Apply Mycompare_0123456789Sym0 a) a- type family Mycompare_0123456789 (a :: ())- (a :: ()) :: Ordering where- Mycompare_0123456789 _z_0123456789 a_0123456789 = Apply (Apply ConstSym0 EQSym0) a_0123456789- type Mycompare_0123456789Sym2 (t :: ()) (t :: ()) =- Mycompare_0123456789 t t- instance SuppressUnusedWarnings Mycompare_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym1KindInference GHC.Tuple.())- data Mycompare_0123456789Sym1 (l :: ()) (l :: TyFun () Ordering)- = forall arg. KindOf (Apply (Mycompare_0123456789Sym1 l) arg) ~ KindOf (Mycompare_0123456789Sym2 l arg) =>- Mycompare_0123456789Sym1KindInference- type instance Apply (Mycompare_0123456789Sym1 l) l = Mycompare_0123456789Sym2 l l- instance SuppressUnusedWarnings Mycompare_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym0KindInference GHC.Tuple.())- data Mycompare_0123456789Sym0 (l :: TyFun () (TyFun () Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply Mycompare_0123456789Sym0 arg) ~ KindOf (Mycompare_0123456789Sym1 arg) =>- Mycompare_0123456789Sym0KindInference- type instance Apply Mycompare_0123456789Sym0 l = Mycompare_0123456789Sym1 l- instance PMyOrd (Proxy :: Proxy ()) where- type Mycompare (a :: ()) (a :: ()) = Apply (Apply Mycompare_0123456789Sym0 a) a- type family Mycompare_0123456789 (a :: Foo)- (a :: Foo) :: Ordering where- Mycompare_0123456789 a_0123456789 a_0123456789 = Apply (Apply FooCompareSym0 a_0123456789) a_0123456789- type Mycompare_0123456789Sym2 (t :: Foo) (t :: Foo) =- Mycompare_0123456789 t t- instance SuppressUnusedWarnings Mycompare_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym1KindInference GHC.Tuple.())- data Mycompare_0123456789Sym1 (l :: Foo) (l :: TyFun Foo Ordering)- = forall arg. KindOf (Apply (Mycompare_0123456789Sym1 l) arg) ~ KindOf (Mycompare_0123456789Sym2 l arg) =>- Mycompare_0123456789Sym1KindInference- type instance Apply (Mycompare_0123456789Sym1 l) l = Mycompare_0123456789Sym2 l l- instance SuppressUnusedWarnings Mycompare_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym0KindInference GHC.Tuple.())- data Mycompare_0123456789Sym0 (l :: TyFun Foo (TyFun Foo Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply Mycompare_0123456789Sym0 arg) ~ KindOf (Mycompare_0123456789Sym1 arg) =>- Mycompare_0123456789Sym0KindInference- type instance Apply Mycompare_0123456789Sym0 l = Mycompare_0123456789Sym1 l- instance PMyOrd (Proxy :: Proxy Foo) where- type Mycompare (a :: Foo) (a :: Foo) = Apply (Apply Mycompare_0123456789Sym0 a) a- type family TFHelper_0123456789 (a :: Foo2)- (a :: Foo2) :: Bool where- TFHelper_0123456789 F F = TrueSym0- TFHelper_0123456789 G G = TrueSym0- TFHelper_0123456789 F G = FalseSym0- TFHelper_0123456789 G F = FalseSym0- type TFHelper_0123456789Sym2 (t :: Foo2) (t :: Foo2) =- TFHelper_0123456789 t t- instance SuppressUnusedWarnings TFHelper_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) TFHelper_0123456789Sym1KindInference GHC.Tuple.())- data TFHelper_0123456789Sym1 (l :: Foo2) (l :: TyFun Foo2 Bool)- = forall arg. KindOf (Apply (TFHelper_0123456789Sym1 l) arg) ~ KindOf (TFHelper_0123456789Sym2 l arg) =>- TFHelper_0123456789Sym1KindInference- type instance Apply (TFHelper_0123456789Sym1 l) l = TFHelper_0123456789Sym2 l l- instance SuppressUnusedWarnings TFHelper_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) TFHelper_0123456789Sym0KindInference GHC.Tuple.())- data TFHelper_0123456789Sym0 (l :: TyFun Foo2 (TyFun Foo2 Bool- -> GHC.Types.Type))- = forall arg. KindOf (Apply TFHelper_0123456789Sym0 arg) ~ KindOf (TFHelper_0123456789Sym1 arg) =>- TFHelper_0123456789Sym0KindInference- type instance Apply TFHelper_0123456789Sym0 l = TFHelper_0123456789Sym1 l- instance PEq (Proxy :: Proxy Foo2) where- type (:==) (a :: Foo2) (a :: Foo2) = Apply (Apply TFHelper_0123456789Sym0 a) a- infix 4 %:<=>- sFooCompare ::- forall (t :: Foo) (t :: Foo).- Sing t- -> Sing t -> Sing (Apply (Apply FooCompareSym0 t) t :: Ordering)- sConst ::- forall (t :: a) (t :: b).- Sing t -> Sing t -> Sing (Apply (Apply ConstSym0 t) t :: a)- sFooCompare SA SA- = let- lambda ::- (t ~ ASym0, t ~ ASym0) =>- Sing (Apply (Apply FooCompareSym0 t) t :: Ordering)- lambda = SEQ- in lambda- sFooCompare SA SB- = let- lambda ::- (t ~ ASym0, t ~ BSym0) =>- Sing (Apply (Apply FooCompareSym0 t) t :: Ordering)- lambda = SLT- in lambda- sFooCompare SB SB- = let- lambda ::- (t ~ BSym0, t ~ BSym0) =>- Sing (Apply (Apply FooCompareSym0 t) t :: Ordering)- lambda = SGT- in lambda- sFooCompare SB SA- = let- lambda ::- (t ~ BSym0, t ~ ASym0) =>- Sing (Apply (Apply FooCompareSym0 t) t :: Ordering)- lambda = SEQ- in lambda- sConst sX _s_z_0123456789- = let- lambda ::- forall x _z_0123456789.- (t ~ x, t ~ _z_0123456789) =>- Sing x- -> Sing _z_0123456789 -> Sing (Apply (Apply ConstSym0 t) t :: a)- lambda x _z_0123456789 = x- in lambda sX _s_z_0123456789- data instance Sing (z :: Foo) = z ~ A => SA | z ~ B => SB- type SFoo = (Sing :: Foo -> GHC.Types.Type)- instance SingKind Foo where- type DemoteRep Foo = Foo- fromSing SA = A- fromSing SB = B- toSing A = SomeSing SA- toSing B = SomeSing SB- data instance Sing (z :: Foo2) = z ~ F => SF | z ~ G => SG- type SFoo2 = (Sing :: Foo2 -> GHC.Types.Type)- instance SingKind Foo2 where- type DemoteRep Foo2 = Foo2- fromSing SF = F- fromSing SG = G- toSing F = SomeSing SF- toSing G = SomeSing SG- class SMyOrd a where- sMycompare ::- forall (t :: a) (t :: a).- Sing t- -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- (%:<=>) ::- forall (t :: a) (t :: a).- Sing t -> Sing t -> Sing (Apply (Apply (:<=>$) t) t :: Ordering)- default (%:<=>) ::- forall (t :: a) (t :: a).- Apply (Apply (:<=>$) t) t ~ Apply (Apply TFHelper_0123456789Sym0 t) t =>- Sing t -> Sing t -> Sing (Apply (Apply (:<=>$) t) t :: Ordering)- (%:<=>) sA_0123456789 sA_0123456789- = let- lambda ::- forall a_0123456789 a_0123456789.- (t ~ a_0123456789, t ~ a_0123456789) =>- Sing a_0123456789- -> Sing a_0123456789- -> Sing (Apply (Apply (:<=>$) t) t :: Ordering)- lambda a_0123456789 a_0123456789- = applySing- (applySing- (singFun2 (Proxy :: Proxy MycompareSym0) sMycompare) a_0123456789)- a_0123456789- in lambda sA_0123456789 sA_0123456789- instance SMyOrd Nat where- sMycompare ::- forall (t :: Nat) (t :: Nat).- Sing t- -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- sMycompare SZero SZero- = let- lambda ::- (t ~ ZeroSym0, t ~ ZeroSym0) =>- Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- lambda = SEQ- in lambda- sMycompare SZero (SSucc _s_z_0123456789)- = let- lambda ::- forall _z_0123456789.- (t ~ ZeroSym0, t ~ Apply SuccSym0 _z_0123456789) =>- Sing _z_0123456789- -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- lambda _z_0123456789 = SLT- in lambda _s_z_0123456789- sMycompare (SSucc _s_z_0123456789) SZero- = let- lambda ::- forall _z_0123456789.- (t ~ Apply SuccSym0 _z_0123456789, t ~ ZeroSym0) =>- Sing _z_0123456789- -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- lambda _z_0123456789 = SGT- in lambda _s_z_0123456789- sMycompare (SSucc sN) (SSucc sM)- = let- lambda ::- forall n m.- (t ~ Apply SuccSym0 n, t ~ Apply SuccSym0 m) =>- Sing n- -> Sing m -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- lambda n m- = applySing- (applySing (singFun2 (Proxy :: Proxy MycompareSym0) sMycompare) m)- n- in lambda sN sM- instance SMyOrd () where- sMycompare ::- forall (t :: ()) (t :: ()).- Sing t- -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- sMycompare _s_z_0123456789 sA_0123456789- = let- lambda ::- forall _z_0123456789 a_0123456789.- (t ~ _z_0123456789, t ~ a_0123456789) =>- Sing _z_0123456789- -> Sing a_0123456789- -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- lambda _z_0123456789 a_0123456789- = applySing- (applySing (singFun2 (Proxy :: Proxy ConstSym0) sConst) SEQ)- a_0123456789- in lambda _s_z_0123456789 sA_0123456789- instance SMyOrd Foo where- sMycompare ::- forall (t :: Foo) (t :: Foo).- Sing t- -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- sMycompare sA_0123456789 sA_0123456789- = let- lambda ::- forall a_0123456789 a_0123456789.- (t ~ a_0123456789, t ~ a_0123456789) =>- Sing a_0123456789- -> Sing a_0123456789- -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- lambda a_0123456789 a_0123456789- = applySing- (applySing- (singFun2 (Proxy :: Proxy FooCompareSym0) sFooCompare)- a_0123456789)- a_0123456789- in lambda sA_0123456789 sA_0123456789- instance SEq Foo2 where- (%:==) ::- forall (a :: Foo2) (b :: Foo2).- Sing a -> Sing b -> Sing ((:==) a b)- (%:==) SF SF- = let- lambda :: (a ~ FSym0, b ~ FSym0) => Sing (Apply (Apply (:==$) a) b)- lambda = STrue- in lambda- (%:==) SG SG- = let- lambda :: (a ~ GSym0, b ~ GSym0) => Sing (Apply (Apply (:==$) a) b)- lambda = STrue- in lambda- (%:==) SF SG- = let- lambda :: (a ~ FSym0, b ~ GSym0) => Sing (Apply (Apply (:==$) a) b)- lambda = SFalse- in lambda- (%:==) SG SF- = let- lambda :: (a ~ GSym0, b ~ FSym0) => Sing (Apply (Apply (:==$) a) b)- lambda = SFalse- in lambda- instance SingI A where- sing = SA- instance SingI B where- sing = SB- instance SingI F where- sing = SF- instance SingI G where- sing = SG-Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations- promote- [d| instance Ord Foo2 where- F `compare` F = EQ- F `compare` _ = LT- _ `compare` _ = GT- instance MyOrd Foo2 where- F `mycompare` F = EQ- F `mycompare` _ = LT- _ `mycompare` _ = GT |]- ======>- instance MyOrd Foo2 where- mycompare F F = EQ- mycompare F _ = LT- mycompare _ _ = GT- instance Ord Foo2 where- compare F F = EQ- compare F _ = LT- compare _ _ = GT- type family Mycompare_0123456789 (a :: Foo2)- (a :: Foo2) :: Ordering where- Mycompare_0123456789 F F = EQSym0- Mycompare_0123456789 F _z_0123456789 = LTSym0- Mycompare_0123456789 _z_0123456789 _z_0123456789 = GTSym0- type Mycompare_0123456789Sym2 (t :: Foo2) (t :: Foo2) =- Mycompare_0123456789 t t- instance SuppressUnusedWarnings Mycompare_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym1KindInference GHC.Tuple.())- data Mycompare_0123456789Sym1 (l :: Foo2)- (l :: TyFun Foo2 Ordering)- = forall arg. KindOf (Apply (Mycompare_0123456789Sym1 l) arg) ~ KindOf (Mycompare_0123456789Sym2 l arg) =>- Mycompare_0123456789Sym1KindInference- type instance Apply (Mycompare_0123456789Sym1 l) l = Mycompare_0123456789Sym2 l l- instance SuppressUnusedWarnings Mycompare_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym0KindInference GHC.Tuple.())- data Mycompare_0123456789Sym0 (l :: TyFun Foo2 (TyFun Foo2 Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply Mycompare_0123456789Sym0 arg) ~ KindOf (Mycompare_0123456789Sym1 arg) =>- Mycompare_0123456789Sym0KindInference- type instance Apply Mycompare_0123456789Sym0 l = Mycompare_0123456789Sym1 l- instance PMyOrd (Proxy :: Proxy Foo2) where- type Mycompare (a :: Foo2) (a :: Foo2) = Apply (Apply Mycompare_0123456789Sym0 a) a- type family Compare_0123456789 (a :: Foo2)- (a :: Foo2) :: Ordering where- Compare_0123456789 F F = EQSym0- Compare_0123456789 F _z_0123456789 = LTSym0- Compare_0123456789 _z_0123456789 _z_0123456789 = GTSym0- type Compare_0123456789Sym2 (t :: Foo2) (t :: Foo2) =- Compare_0123456789 t t- instance SuppressUnusedWarnings Compare_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Compare_0123456789Sym1KindInference GHC.Tuple.())- data Compare_0123456789Sym1 (l :: Foo2) (l :: TyFun Foo2 Ordering)- = forall arg. KindOf (Apply (Compare_0123456789Sym1 l) arg) ~ KindOf (Compare_0123456789Sym2 l arg) =>- Compare_0123456789Sym1KindInference- type instance Apply (Compare_0123456789Sym1 l) l = Compare_0123456789Sym2 l l- instance SuppressUnusedWarnings Compare_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Compare_0123456789Sym0KindInference GHC.Tuple.())- data Compare_0123456789Sym0 (l :: TyFun Foo2 (TyFun Foo2 Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply Compare_0123456789Sym0 arg) ~ KindOf (Compare_0123456789Sym1 arg) =>- Compare_0123456789Sym0KindInference- type instance Apply Compare_0123456789Sym0 l = Compare_0123456789Sym1 l- instance POrd (Proxy :: Proxy Foo2) where- type Compare (a :: Foo2) (a :: Foo2) = Apply (Apply Compare_0123456789Sym0 a) a-Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| data Nat' = Zero' | Succ' Nat'- - instance MyOrd Nat' where- Zero' `mycompare` Zero' = EQ- Zero' `mycompare` (Succ' _) = LT- (Succ' _) `mycompare` Zero' = GT- (Succ' n) `mycompare` (Succ' m) = m `mycompare` n |]- ======>- data Nat' = Zero' | Succ' Nat'- instance MyOrd Nat' where- mycompare Zero' Zero' = EQ- mycompare Zero' (Succ' _) = LT- mycompare (Succ' _) Zero' = GT- mycompare (Succ' n) (Succ' m) = (m `mycompare` n)- type Zero'Sym0 = Zero'- type Succ'Sym1 (t :: Nat') = Succ' t- instance SuppressUnusedWarnings Succ'Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Succ'Sym0KindInference GHC.Tuple.())- data Succ'Sym0 (l :: TyFun Nat' Nat')- = forall arg. KindOf (Apply Succ'Sym0 arg) ~ KindOf (Succ'Sym1 arg) =>- Succ'Sym0KindInference- type instance Apply Succ'Sym0 l = Succ'Sym1 l- type family Mycompare_0123456789 (a :: Nat')- (a :: Nat') :: Ordering where- Mycompare_0123456789 Zero' Zero' = EQSym0- Mycompare_0123456789 Zero' (Succ' _z_0123456789) = LTSym0- Mycompare_0123456789 (Succ' _z_0123456789) Zero' = GTSym0- Mycompare_0123456789 (Succ' n) (Succ' m) = Apply (Apply MycompareSym0 m) n- type Mycompare_0123456789Sym2 (t :: Nat') (t :: Nat') =- Mycompare_0123456789 t t- instance SuppressUnusedWarnings Mycompare_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym1KindInference GHC.Tuple.())- data Mycompare_0123456789Sym1 (l :: Nat')- (l :: TyFun Nat' Ordering)- = forall arg. KindOf (Apply (Mycompare_0123456789Sym1 l) arg) ~ KindOf (Mycompare_0123456789Sym2 l arg) =>- Mycompare_0123456789Sym1KindInference- type instance Apply (Mycompare_0123456789Sym1 l) l = Mycompare_0123456789Sym2 l l- instance SuppressUnusedWarnings Mycompare_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym0KindInference GHC.Tuple.())- data Mycompare_0123456789Sym0 (l :: TyFun Nat' (TyFun Nat' Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply Mycompare_0123456789Sym0 arg) ~ KindOf (Mycompare_0123456789Sym1 arg) =>- Mycompare_0123456789Sym0KindInference- type instance Apply Mycompare_0123456789Sym0 l = Mycompare_0123456789Sym1 l- instance PMyOrd (Proxy :: Proxy Nat') where- type Mycompare (a :: Nat') (a :: Nat') = Apply (Apply Mycompare_0123456789Sym0 a) a- data instance Sing (z :: Nat')- = z ~ Zero' => SZero' |- forall (n :: Nat'). z ~ Succ' n => SSucc' (Sing (n :: Nat'))- type SNat' = (Sing :: Nat' -> GHC.Types.Type)- instance SingKind Nat' where- type DemoteRep Nat' = Nat'- fromSing SZero' = Zero'- fromSing (SSucc' b) = Succ' (fromSing b)- toSing Zero' = SomeSing SZero'- toSing (Succ' b)- = case toSing b :: SomeSing Nat' of {- SomeSing c -> SomeSing (SSucc' c) }- instance SMyOrd Nat' where- sMycompare ::- forall (t :: Nat') (t :: Nat').- Sing t- -> Sing t- -> Sing (Apply (Apply (MycompareSym0 :: TyFun Nat' (TyFun Nat' Ordering- -> GHC.Types.Type)- -> GHC.Types.Type) t :: TyFun Nat' Ordering- -> GHC.Types.Type) t :: Ordering)- sMycompare SZero' SZero'- = let- lambda ::- (t ~ Zero'Sym0, t ~ Zero'Sym0) =>- Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- lambda = SEQ- in lambda- sMycompare SZero' (SSucc' _s_z_0123456789)- = let- lambda ::- forall _z_0123456789.- (t ~ Zero'Sym0, t ~ Apply Succ'Sym0 _z_0123456789) =>- Sing _z_0123456789- -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- lambda _z_0123456789 = SLT- in lambda _s_z_0123456789- sMycompare (SSucc' _s_z_0123456789) SZero'- = let- lambda ::- forall _z_0123456789.- (t ~ Apply Succ'Sym0 _z_0123456789, t ~ Zero'Sym0) =>- Sing _z_0123456789- -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- lambda _z_0123456789 = SGT- in lambda _s_z_0123456789- sMycompare (SSucc' sN) (SSucc' sM)- = let- lambda ::- forall n m.- (t ~ Apply Succ'Sym0 n, t ~ Apply Succ'Sym0 m) =>- Sing n- -> Sing m -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)- lambda n m- = applySing- (applySing (singFun2 (Proxy :: Proxy MycompareSym0) sMycompare) m)- n- in lambda sN sM- instance SingI Zero' where- sing = SZero'- instance SingI n => SingI (Succ' (n :: Nat')) where- sing = SSucc' sing
+ tests/compile-and-dump/Singletons/Classes.ghc82.template view
@@ -0,0 +1,529 @@+Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| infix 4 <=>+ + const :: a -> b -> a+ const x _ = x+ fooCompare :: Foo -> Foo -> Ordering+ fooCompare A A = EQ+ fooCompare A B = LT+ fooCompare B B = GT+ fooCompare B A = EQ+ + class MyOrd a where+ mycompare :: a -> a -> Ordering+ (<=>) :: a -> a -> Ordering+ (<=>) = mycompare+ infix 4 <=>+ data Foo = A | B+ data Foo2 = F | G+ + instance MyOrd () where+ mycompare _ = const EQ+ instance MyOrd Nat where+ Zero `mycompare` Zero = EQ+ Zero `mycompare` (Succ _) = LT+ (Succ _) `mycompare` Zero = GT+ (Succ n) `mycompare` (Succ m) = m `mycompare` n+ instance MyOrd Foo where+ mycompare = fooCompare+ instance Eq Foo2 where+ F == F = True+ G == G = True+ F == G = False+ G == F = False |]+ ======>+ const :: a -> b -> a+ const x _ = x+ class MyOrd a where+ mycompare :: a -> a -> Ordering+ (<=>) :: a -> a -> Ordering+ (<=>) = mycompare+ infix 4 <=>+ instance MyOrd Nat where+ mycompare Zero Zero = EQ+ mycompare Zero (Succ _) = LT+ mycompare (Succ _) Zero = GT+ mycompare (Succ n) (Succ m) = (m `mycompare` n)+ instance MyOrd () where+ mycompare _ = const EQ+ data Foo = A | B+ fooCompare :: Foo -> Foo -> Ordering+ fooCompare A A = EQ+ fooCompare A B = LT+ fooCompare B B = GT+ fooCompare B A = EQ+ instance MyOrd Foo where+ mycompare = fooCompare+ data Foo2 = F | G+ instance Eq Foo2 where+ (==) F F = True+ (==) G G = True+ (==) F G = False+ (==) G F = False+ type ASym0 = A+ type BSym0 = B+ type FSym0 = F+ type GSym0 = G+ type FooCompareSym2 (t :: Foo) (t :: Foo) = FooCompare t t+ instance SuppressUnusedWarnings FooCompareSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooCompareSym1KindInference) GHC.Tuple.())+ data FooCompareSym1 (l :: Foo) (l :: TyFun Foo Ordering)+ = forall arg. SameKind (Apply (FooCompareSym1 l) arg) (FooCompareSym2 l arg) =>+ FooCompareSym1KindInference+ type instance Apply (FooCompareSym1 l) l = FooCompare l l+ instance SuppressUnusedWarnings FooCompareSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooCompareSym0KindInference) GHC.Tuple.())+ data FooCompareSym0 (l :: TyFun Foo (TyFun Foo Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply FooCompareSym0 arg) (FooCompareSym1 arg) =>+ FooCompareSym0KindInference+ type instance Apply FooCompareSym0 l = FooCompareSym1 l+ type ConstSym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Const t t+ instance SuppressUnusedWarnings ConstSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ConstSym1KindInference) GHC.Tuple.())+ data ConstSym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply (ConstSym1 l) arg) (ConstSym2 l arg) =>+ ConstSym1KindInference+ type instance Apply (ConstSym1 l) l = Const l l+ instance SuppressUnusedWarnings ConstSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ConstSym0KindInference) GHC.Tuple.())+ data ConstSym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply ConstSym0 arg) (ConstSym1 arg) =>+ ConstSym0KindInference+ type instance Apply ConstSym0 l = ConstSym1 l+ type family FooCompare (a :: Foo) (a :: Foo) :: Ordering where+ FooCompare A A = EQSym0+ FooCompare A B = LTSym0+ FooCompare B B = GTSym0+ FooCompare B A = EQSym0+ type family Const (a :: a) (a :: b) :: a where+ Const x _z_0123456789876543210 = x+ infix 4 :<=>+ type MycompareSym2 (t :: a0123456789876543210) (t :: a0123456789876543210) =+ Mycompare t t+ instance SuppressUnusedWarnings MycompareSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) MycompareSym1KindInference) GHC.Tuple.())+ data MycompareSym1 (l :: a0123456789876543210) (l :: TyFun a0123456789876543210 Ordering)+ = forall arg. SameKind (Apply (MycompareSym1 l) arg) (MycompareSym2 l arg) =>+ MycompareSym1KindInference+ type instance Apply (MycompareSym1 l) l = Mycompare l l+ instance SuppressUnusedWarnings MycompareSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) MycompareSym0KindInference) GHC.Tuple.())+ data MycompareSym0 (l :: TyFun a0123456789876543210 (TyFun a0123456789876543210 Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply MycompareSym0 arg) (MycompareSym1 arg) =>+ MycompareSym0KindInference+ type instance Apply MycompareSym0 l = MycompareSym1 l+ type (:<=>$$$) (t :: a0123456789876543210) (t :: a0123456789876543210) =+ (:<=>) t t+ instance SuppressUnusedWarnings (:<=>$$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:<=>$$###)) GHC.Tuple.())+ data (:<=>$$) (l :: a0123456789876543210) (l :: TyFun a0123456789876543210 Ordering)+ = forall arg. SameKind (Apply ((:<=>$$) l) arg) ((:<=>$$$) l arg) =>+ (:<=>$$###)+ type instance Apply ((:<=>$$) l) l = (:<=>) l l+ instance SuppressUnusedWarnings (:<=>$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:<=>$###)) GHC.Tuple.())+ data (:<=>$) (l :: TyFun a0123456789876543210 (TyFun a0123456789876543210 Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (:<=>$) arg) ((:<=>$$) arg) =>+ (:<=>$###)+ type instance Apply (:<=>$) l = (:<=>$$) l+ type family TFHelper_0123456789876543210 (a :: a) (a :: a) :: Ordering where+ TFHelper_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply MycompareSym0 a_0123456789876543210) a_0123456789876543210+ type TFHelper_0123456789876543210Sym2 (t :: a0123456789876543210) (t :: a0123456789876543210) =+ TFHelper_0123456789876543210 t t+ instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) TFHelper_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data TFHelper_0123456789876543210Sym1 (l :: a0123456789876543210) (l :: TyFun a0123456789876543210 Ordering)+ = forall arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 l) arg) (TFHelper_0123456789876543210Sym2 l arg) =>+ TFHelper_0123456789876543210Sym1KindInference+ type instance Apply (TFHelper_0123456789876543210Sym1 l) l = TFHelper_0123456789876543210 l l+ instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) TFHelper_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data TFHelper_0123456789876543210Sym0 (l :: TyFun a0123456789876543210 (TyFun a0123456789876543210 Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>+ TFHelper_0123456789876543210Sym0KindInference+ type instance Apply TFHelper_0123456789876543210Sym0 l = TFHelper_0123456789876543210Sym1 l+ class PMyOrd (a :: GHC.Types.Type) where+ type Mycompare (arg :: a) (arg :: a) :: Ordering+ type (:<=>) (arg :: a) (arg :: a) :: Ordering+ type (:<=>) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a+ type family Mycompare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where+ Mycompare_0123456789876543210 Zero Zero = EQSym0+ Mycompare_0123456789876543210 Zero (Succ _z_0123456789876543210) = LTSym0+ Mycompare_0123456789876543210 (Succ _z_0123456789876543210) Zero = GTSym0+ Mycompare_0123456789876543210 (Succ n) (Succ m) = Apply (Apply MycompareSym0 m) n+ type Mycompare_0123456789876543210Sym2 (t :: Nat) (t :: Nat) =+ Mycompare_0123456789876543210 t t+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym1 (l :: Nat) (l :: TyFun Nat Ordering)+ = forall arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 l) arg) (Mycompare_0123456789876543210Sym2 l arg) =>+ Mycompare_0123456789876543210Sym1KindInference+ type instance Apply (Mycompare_0123456789876543210Sym1 l) l = Mycompare_0123456789876543210 l l+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym0 (l :: TyFun Nat (TyFun Nat Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>+ Mycompare_0123456789876543210Sym0KindInference+ type instance Apply Mycompare_0123456789876543210Sym0 l = Mycompare_0123456789876543210Sym1 l+ instance PMyOrd Nat where+ type Mycompare (a :: Nat) (a :: Nat) = Apply (Apply Mycompare_0123456789876543210Sym0 a) a+ type family Mycompare_0123456789876543210 (a :: ()) (a :: ()) :: Ordering where+ Mycompare_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 = Apply (Apply ConstSym0 EQSym0) a_0123456789876543210+ type Mycompare_0123456789876543210Sym2 (t :: ()) (t :: ()) =+ Mycompare_0123456789876543210 t t+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym1 (l :: ()) (l :: TyFun () Ordering)+ = forall arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 l) arg) (Mycompare_0123456789876543210Sym2 l arg) =>+ Mycompare_0123456789876543210Sym1KindInference+ type instance Apply (Mycompare_0123456789876543210Sym1 l) l = Mycompare_0123456789876543210 l l+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym0 (l :: TyFun () (TyFun () Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>+ Mycompare_0123456789876543210Sym0KindInference+ type instance Apply Mycompare_0123456789876543210Sym0 l = Mycompare_0123456789876543210Sym1 l+ instance PMyOrd () where+ type Mycompare (a :: ()) (a :: ()) = Apply (Apply Mycompare_0123456789876543210Sym0 a) a+ type family Mycompare_0123456789876543210 (a :: Foo) (a :: Foo) :: Ordering where+ Mycompare_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply FooCompareSym0 a_0123456789876543210) a_0123456789876543210+ type Mycompare_0123456789876543210Sym2 (t :: Foo) (t :: Foo) =+ Mycompare_0123456789876543210 t t+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym1 (l :: Foo) (l :: TyFun Foo Ordering)+ = forall arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 l) arg) (Mycompare_0123456789876543210Sym2 l arg) =>+ Mycompare_0123456789876543210Sym1KindInference+ type instance Apply (Mycompare_0123456789876543210Sym1 l) l = Mycompare_0123456789876543210 l l+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym0 (l :: TyFun Foo (TyFun Foo Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>+ Mycompare_0123456789876543210Sym0KindInference+ type instance Apply Mycompare_0123456789876543210Sym0 l = Mycompare_0123456789876543210Sym1 l+ instance PMyOrd Foo where+ type Mycompare (a :: Foo) (a :: Foo) = Apply (Apply Mycompare_0123456789876543210Sym0 a) a+ type family TFHelper_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Bool where+ TFHelper_0123456789876543210 F F = TrueSym0+ TFHelper_0123456789876543210 G G = TrueSym0+ TFHelper_0123456789876543210 F G = FalseSym0+ TFHelper_0123456789876543210 G F = FalseSym0+ type TFHelper_0123456789876543210Sym2 (t :: Foo2) (t :: Foo2) =+ TFHelper_0123456789876543210 t t+ instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) TFHelper_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data TFHelper_0123456789876543210Sym1 (l :: Foo2) (l :: TyFun Foo2 Bool)+ = forall arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 l) arg) (TFHelper_0123456789876543210Sym2 l arg) =>+ TFHelper_0123456789876543210Sym1KindInference+ type instance Apply (TFHelper_0123456789876543210Sym1 l) l = TFHelper_0123456789876543210 l l+ instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) TFHelper_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data TFHelper_0123456789876543210Sym0 (l :: TyFun Foo2 (TyFun Foo2 Bool+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>+ TFHelper_0123456789876543210Sym0KindInference+ type instance Apply TFHelper_0123456789876543210Sym0 l = TFHelper_0123456789876543210Sym1 l+ instance PEq Foo2 where+ type (:==) (a :: Foo2) (a :: Foo2) = Apply (Apply TFHelper_0123456789876543210Sym0 a) a+ infix 4 %:<=>+ sFooCompare ::+ forall (t :: Foo) (t :: Foo).+ Sing t+ -> Sing t -> Sing (Apply (Apply FooCompareSym0 t) t :: Ordering)+ sConst ::+ forall (t :: a) (t :: b).+ Sing t -> Sing t -> Sing (Apply (Apply ConstSym0 t) t :: a)+ sFooCompare SA SA = SEQ+ sFooCompare SA SB = SLT+ sFooCompare SB SB = SGT+ sFooCompare SB SA = SEQ+ sConst (sX :: Sing x) _ = sX+ data instance Sing (z :: Foo) = z ~ A => SA | z ~ B => SB+ type SFoo = (Sing :: Foo -> GHC.Types.Type)+ instance SingKind Foo where+ type Demote Foo = Foo+ fromSing SA = A+ fromSing SB = B+ toSing A = SomeSing SA+ toSing B = SomeSing SB+ data instance Sing (z :: Foo2) = z ~ F => SF | z ~ G => SG+ type SFoo2 = (Sing :: Foo2 -> GHC.Types.Type)+ instance SingKind Foo2 where+ type Demote Foo2 = Foo2+ fromSing SF = F+ fromSing SG = G+ toSing F = SomeSing SF+ toSing G = SomeSing SG+ class SMyOrd a where+ sMycompare ::+ forall (t :: a) (t :: a).+ Sing t+ -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)+ (%:<=>) ::+ forall (t :: a) (t :: a).+ Sing t -> Sing t -> Sing (Apply (Apply (:<=>$) t) t :: Ordering)+ default (%:<=>) ::+ forall (t :: a) (t :: a).+ (Apply (Apply (:<=>$) t) t :: Ordering) ~ Apply (Apply TFHelper_0123456789876543210Sym0 t) t =>+ Sing t -> Sing t -> Sing (Apply (Apply (:<=>$) t) t :: Ordering)+ (%:<=>)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ ((applySing ((singFun2 @MycompareSym0) sMycompare))+ sA_0123456789876543210))+ sA_0123456789876543210+ instance SMyOrd Nat where+ sMycompare ::+ forall (t :: Nat) (t :: Nat).+ Sing t+ -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)+ sMycompare SZero SZero = SEQ+ sMycompare SZero (SSucc _) = SLT+ sMycompare (SSucc _) SZero = SGT+ sMycompare (SSucc (sN :: Sing n)) (SSucc (sM :: Sing m))+ = (applySing+ ((applySing ((singFun2 @MycompareSym0) sMycompare)) sM))+ sN+ instance SMyOrd () where+ sMycompare ::+ forall (t :: ()) (t :: ()).+ Sing t+ -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)+ sMycompare _ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing ((applySing ((singFun2 @ConstSym0) sConst)) SEQ))+ sA_0123456789876543210+ instance SMyOrd Foo where+ sMycompare ::+ forall (t :: Foo) (t :: Foo).+ Sing t+ -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)+ sMycompare+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ ((applySing ((singFun2 @FooCompareSym0) sFooCompare))+ sA_0123456789876543210))+ sA_0123456789876543210+ instance SEq Foo2 where+ (%:==) ::+ forall (a :: Foo2) (b :: Foo2).+ Sing a -> Sing b -> Sing ((:==) a b)+ (%:==) SF SF = STrue+ (%:==) SG SG = STrue+ (%:==) SF SG = SFalse+ (%:==) SG SF = SFalse+ instance SingI A where+ sing = SA+ instance SingI B where+ sing = SB+ instance SingI F where+ sing = SF+ instance SingI G where+ sing = SG+Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations+ promote+ [d| instance Ord Foo2 where+ F `compare` F = EQ+ F `compare` _ = LT+ _ `compare` _ = GT+ instance MyOrd Foo2 where+ F `mycompare` F = EQ+ F `mycompare` _ = LT+ _ `mycompare` _ = GT |]+ ======>+ instance MyOrd Foo2 where+ mycompare F F = EQ+ mycompare F _ = LT+ mycompare _ _ = GT+ instance Ord Foo2 where+ compare F F = EQ+ compare F _ = LT+ compare _ _ = GT+ type family Mycompare_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Ordering where+ Mycompare_0123456789876543210 F F = EQSym0+ Mycompare_0123456789876543210 F _z_0123456789876543210 = LTSym0+ Mycompare_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 = GTSym0+ type Mycompare_0123456789876543210Sym2 (t :: Foo2) (t :: Foo2) =+ Mycompare_0123456789876543210 t t+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym1 (l :: Foo2) (l :: TyFun Foo2 Ordering)+ = forall arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 l) arg) (Mycompare_0123456789876543210Sym2 l arg) =>+ Mycompare_0123456789876543210Sym1KindInference+ type instance Apply (Mycompare_0123456789876543210Sym1 l) l = Mycompare_0123456789876543210 l l+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym0 (l :: TyFun Foo2 (TyFun Foo2 Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>+ Mycompare_0123456789876543210Sym0KindInference+ type instance Apply Mycompare_0123456789876543210Sym0 l = Mycompare_0123456789876543210Sym1 l+ instance PMyOrd Foo2 where+ type Mycompare (a :: Foo2) (a :: Foo2) = Apply (Apply Mycompare_0123456789876543210Sym0 a) a+ type family Compare_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Ordering where+ Compare_0123456789876543210 F F = EQSym0+ Compare_0123456789876543210 F _z_0123456789876543210 = LTSym0+ Compare_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 = GTSym0+ type Compare_0123456789876543210Sym2 (t :: Foo2) (t :: Foo2) =+ Compare_0123456789876543210 t t+ instance SuppressUnusedWarnings Compare_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym1 (l :: Foo2) (l :: TyFun Foo2 Ordering)+ = forall arg. SameKind (Apply (Compare_0123456789876543210Sym1 l) arg) (Compare_0123456789876543210Sym2 l arg) =>+ Compare_0123456789876543210Sym1KindInference+ type instance Apply (Compare_0123456789876543210Sym1 l) l = Compare_0123456789876543210 l l+ instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym0 (l :: TyFun Foo2 (TyFun Foo2 Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>+ Compare_0123456789876543210Sym0KindInference+ type instance Apply Compare_0123456789876543210Sym0 l = Compare_0123456789876543210Sym1 l+ instance POrd Foo2 where+ type Compare (a :: Foo2) (a :: Foo2) = Apply (Apply Compare_0123456789876543210Sym0 a) a+Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| data Nat' = Zero' | Succ' Nat'+ + instance MyOrd Nat' where+ Zero' `mycompare` Zero' = EQ+ Zero' `mycompare` (Succ' _) = LT+ (Succ' _) `mycompare` Zero' = GT+ (Succ' n) `mycompare` (Succ' m) = m `mycompare` n |]+ ======>+ data Nat' = Zero' | Succ' Nat'+ instance MyOrd Nat' where+ mycompare Zero' Zero' = EQ+ mycompare Zero' (Succ' _) = LT+ mycompare (Succ' _) Zero' = GT+ mycompare (Succ' n) (Succ' m) = (m `mycompare` n)+ type Zero'Sym0 = Zero'+ type Succ'Sym1 (t :: Nat') = Succ' t+ instance SuppressUnusedWarnings Succ'Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Succ'Sym0KindInference) GHC.Tuple.())+ data Succ'Sym0 (l :: TyFun Nat' Nat')+ = forall arg. SameKind (Apply Succ'Sym0 arg) (Succ'Sym1 arg) =>+ Succ'Sym0KindInference+ type instance Apply Succ'Sym0 l = Succ' l+ type family Mycompare_0123456789876543210 (a :: Nat') (a :: Nat') :: Ordering where+ Mycompare_0123456789876543210 Zero' Zero' = EQSym0+ Mycompare_0123456789876543210 Zero' (Succ' _z_0123456789876543210) = LTSym0+ Mycompare_0123456789876543210 (Succ' _z_0123456789876543210) Zero' = GTSym0+ Mycompare_0123456789876543210 (Succ' n) (Succ' m) = Apply (Apply MycompareSym0 m) n+ type Mycompare_0123456789876543210Sym2 (t :: Nat') (t :: Nat') =+ Mycompare_0123456789876543210 t t+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym1 (l :: Nat') (l :: TyFun Nat' Ordering)+ = forall arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 l) arg) (Mycompare_0123456789876543210Sym2 l arg) =>+ Mycompare_0123456789876543210Sym1KindInference+ type instance Apply (Mycompare_0123456789876543210Sym1 l) l = Mycompare_0123456789876543210 l l+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym0 (l :: TyFun Nat' (TyFun Nat' Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>+ Mycompare_0123456789876543210Sym0KindInference+ type instance Apply Mycompare_0123456789876543210Sym0 l = Mycompare_0123456789876543210Sym1 l+ instance PMyOrd Nat' where+ type Mycompare (a :: Nat') (a :: Nat') = Apply (Apply Mycompare_0123456789876543210Sym0 a) a+ data instance Sing (z :: Nat')+ = z ~ Zero' => SZero' |+ forall (n :: Nat'). z ~ Succ' n => SSucc' (Sing (n :: Nat'))+ type SNat' = (Sing :: Nat' -> GHC.Types.Type)+ instance SingKind Nat' where+ type Demote Nat' = Nat'+ fromSing SZero' = Zero'+ fromSing (SSucc' b) = Succ' (fromSing b)+ toSing Zero' = SomeSing SZero'+ toSing (Succ' b)+ = case toSing b :: SomeSing Nat' of {+ SomeSing c -> SomeSing (SSucc' c) }+ instance SMyOrd Nat' where+ sMycompare ::+ forall (t :: Nat') (t :: Nat').+ Sing t+ -> Sing t+ -> Sing (Apply (Apply (MycompareSym0 :: TyFun Nat' (TyFun Nat' Ordering+ -> GHC.Types.Type)+ -> GHC.Types.Type) t :: TyFun Nat' Ordering+ -> GHC.Types.Type) t :: Ordering)+ sMycompare SZero' SZero' = SEQ+ sMycompare SZero' (SSucc' _) = SLT+ sMycompare (SSucc' _) SZero' = SGT+ sMycompare (SSucc' (sN :: Sing n)) (SSucc' (sM :: Sing m))+ = (applySing+ ((applySing ((singFun2 @MycompareSym0) sMycompare)) sM))+ sN+ instance SingI Zero' where+ sing = SZero'+ instance SingI n => SingI (Succ' (n :: Nat')) where+ sing = SSucc' sing
− tests/compile-and-dump/Singletons/Classes2.ghc80.template
@@ -1,116 +0,0 @@-Singletons/Classes2.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| data NatFoo = ZeroFoo | SuccFoo NatFoo- - instance MyOrd NatFoo where- ZeroFoo `mycompare` ZeroFoo = EQ- ZeroFoo `mycompare` (SuccFoo _) = LT- (SuccFoo _) `mycompare` ZeroFoo = GT- (SuccFoo n) `mycompare` (SuccFoo m) = m `mycompare` n |]- ======>- data NatFoo = ZeroFoo | SuccFoo NatFoo- instance MyOrd NatFoo where- mycompare ZeroFoo ZeroFoo = EQ- mycompare ZeroFoo (SuccFoo _) = LT- mycompare (SuccFoo _) ZeroFoo = GT- mycompare (SuccFoo n) (SuccFoo m) = (m `mycompare` n)- type ZeroFooSym0 = ZeroFoo- type SuccFooSym1 (t :: NatFoo) = SuccFoo t- instance SuppressUnusedWarnings SuccFooSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) SuccFooSym0KindInference GHC.Tuple.())- data SuccFooSym0 (l :: TyFun NatFoo NatFoo)- = forall arg. KindOf (Apply SuccFooSym0 arg) ~ KindOf (SuccFooSym1 arg) =>- SuccFooSym0KindInference- type instance Apply SuccFooSym0 l = SuccFooSym1 l- type family Mycompare_0123456789 (a :: NatFoo)- (a :: NatFoo) :: Ordering where- Mycompare_0123456789 ZeroFoo ZeroFoo = EQSym0- Mycompare_0123456789 ZeroFoo (SuccFoo _z_0123456789) = LTSym0- Mycompare_0123456789 (SuccFoo _z_0123456789) ZeroFoo = GTSym0- Mycompare_0123456789 (SuccFoo n) (SuccFoo m) = Apply (Apply MycompareSym0 m) n- type Mycompare_0123456789Sym2 (t :: NatFoo) (t :: NatFoo) =- Mycompare_0123456789 t t- instance SuppressUnusedWarnings Mycompare_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym1KindInference GHC.Tuple.())- data Mycompare_0123456789Sym1 (l :: NatFoo)- (l :: TyFun NatFoo Ordering)- = forall arg. KindOf (Apply (Mycompare_0123456789Sym1 l) arg) ~ KindOf (Mycompare_0123456789Sym2 l arg) =>- Mycompare_0123456789Sym1KindInference- type instance Apply (Mycompare_0123456789Sym1 l) l = Mycompare_0123456789Sym2 l l- instance SuppressUnusedWarnings Mycompare_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Mycompare_0123456789Sym0KindInference GHC.Tuple.())- data Mycompare_0123456789Sym0 (l :: TyFun NatFoo (TyFun NatFoo Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply Mycompare_0123456789Sym0 arg) ~ KindOf (Mycompare_0123456789Sym1 arg) =>- Mycompare_0123456789Sym0KindInference- type instance Apply Mycompare_0123456789Sym0 l = Mycompare_0123456789Sym1 l- instance PMyOrd (Proxy :: Proxy NatFoo) where- type Mycompare (a :: NatFoo) (a :: NatFoo) = Apply (Apply Mycompare_0123456789Sym0 a) a- data instance Sing (z :: NatFoo)- = z ~ ZeroFoo => SZeroFoo |- forall (n :: NatFoo). z ~ SuccFoo n =>- SSuccFoo (Sing (n :: NatFoo))- type SNatFoo = (Sing :: NatFoo -> GHC.Types.Type)- instance SingKind NatFoo where- type DemoteRep NatFoo = NatFoo- fromSing SZeroFoo = ZeroFoo- fromSing (SSuccFoo b) = SuccFoo (fromSing b)- toSing ZeroFoo = SomeSing SZeroFoo- toSing (SuccFoo b)- = case toSing b :: SomeSing NatFoo of {- SomeSing c -> SomeSing (SSuccFoo c) }- instance SMyOrd NatFoo where- sMycompare ::- forall (t0 :: NatFoo) (t1 :: NatFoo).- Sing t0- -> Sing t1- -> Sing (Apply (Apply (MycompareSym0 :: TyFun NatFoo (TyFun NatFoo Ordering- -> GHC.Types.Type)- -> GHC.Types.Type) t0 :: TyFun NatFoo Ordering- -> GHC.Types.Type) t1 :: Ordering)- sMycompare SZeroFoo SZeroFoo- = let- lambda ::- (t0 ~ ZeroFooSym0, t1 ~ ZeroFooSym0) =>- Sing (Apply (Apply MycompareSym0 t0) t1 :: Ordering)- lambda = SEQ- in lambda- sMycompare SZeroFoo (SSuccFoo _s_z_0123456789)- = let- lambda ::- forall _z_0123456789.- (t0 ~ ZeroFooSym0, t1 ~ Apply SuccFooSym0 _z_0123456789) =>- Sing _z_0123456789- -> Sing (Apply (Apply MycompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SLT- in lambda _s_z_0123456789- sMycompare (SSuccFoo _s_z_0123456789) SZeroFoo- = let- lambda ::- forall _z_0123456789.- (t0 ~ Apply SuccFooSym0 _z_0123456789, t1 ~ ZeroFooSym0) =>- Sing _z_0123456789- -> Sing (Apply (Apply MycompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SGT- in lambda _s_z_0123456789- sMycompare (SSuccFoo sN) (SSuccFoo sM)- = let- lambda ::- forall n m.- (t0 ~ Apply SuccFooSym0 n, t1 ~ Apply SuccFooSym0 m) =>- Sing n- -> Sing m -> Sing (Apply (Apply MycompareSym0 t0) t1 :: Ordering)- lambda n m- = applySing- (applySing (singFun2 (Proxy :: Proxy MycompareSym0) sMycompare) m)- n- in lambda sN sM- instance SingI ZeroFoo where- sing = SZeroFoo- instance SingI n => SingI (SuccFoo (n :: NatFoo)) where- sing = SSuccFoo sing
+ tests/compile-and-dump/Singletons/Classes2.ghc82.template view
@@ -0,0 +1,86 @@+Singletons/Classes2.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| data NatFoo = ZeroFoo | SuccFoo NatFoo+ + instance MyOrd NatFoo where+ ZeroFoo `mycompare` ZeroFoo = EQ+ ZeroFoo `mycompare` (SuccFoo _) = LT+ (SuccFoo _) `mycompare` ZeroFoo = GT+ (SuccFoo n) `mycompare` (SuccFoo m) = m `mycompare` n |]+ ======>+ data NatFoo = ZeroFoo | SuccFoo NatFoo+ instance MyOrd NatFoo where+ mycompare ZeroFoo ZeroFoo = EQ+ mycompare ZeroFoo (SuccFoo _) = LT+ mycompare (SuccFoo _) ZeroFoo = GT+ mycompare (SuccFoo n) (SuccFoo m) = (m `mycompare` n)+ type ZeroFooSym0 = ZeroFoo+ type SuccFooSym1 (t :: NatFoo) = SuccFoo t+ instance SuppressUnusedWarnings SuccFooSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) SuccFooSym0KindInference) GHC.Tuple.())+ data SuccFooSym0 (l :: TyFun NatFoo NatFoo)+ = forall arg. SameKind (Apply SuccFooSym0 arg) (SuccFooSym1 arg) =>+ SuccFooSym0KindInference+ type instance Apply SuccFooSym0 l = SuccFoo l+ type family Mycompare_0123456789876543210 (a :: NatFoo) (a :: NatFoo) :: Ordering where+ Mycompare_0123456789876543210 ZeroFoo ZeroFoo = EQSym0+ Mycompare_0123456789876543210 ZeroFoo (SuccFoo _z_0123456789876543210) = LTSym0+ Mycompare_0123456789876543210 (SuccFoo _z_0123456789876543210) ZeroFoo = GTSym0+ Mycompare_0123456789876543210 (SuccFoo n) (SuccFoo m) = Apply (Apply MycompareSym0 m) n+ type Mycompare_0123456789876543210Sym2 (t :: NatFoo) (t :: NatFoo) =+ Mycompare_0123456789876543210 t t+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym1 (l :: NatFoo) (l :: TyFun NatFoo Ordering)+ = forall arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 l) arg) (Mycompare_0123456789876543210Sym2 l arg) =>+ Mycompare_0123456789876543210Sym1KindInference+ type instance Apply (Mycompare_0123456789876543210Sym1 l) l = Mycompare_0123456789876543210 l l+ instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Mycompare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Mycompare_0123456789876543210Sym0 (l :: TyFun NatFoo (TyFun NatFoo Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>+ Mycompare_0123456789876543210Sym0KindInference+ type instance Apply Mycompare_0123456789876543210Sym0 l = Mycompare_0123456789876543210Sym1 l+ instance PMyOrd NatFoo where+ type Mycompare (a :: NatFoo) (a :: NatFoo) = Apply (Apply Mycompare_0123456789876543210Sym0 a) a+ data instance Sing (z :: NatFoo)+ = z ~ ZeroFoo => SZeroFoo |+ forall (n :: NatFoo). z ~ SuccFoo n =>+ SSuccFoo (Sing (n :: NatFoo))+ type SNatFoo = (Sing :: NatFoo -> GHC.Types.Type)+ instance SingKind NatFoo where+ type Demote NatFoo = NatFoo+ fromSing SZeroFoo = ZeroFoo+ fromSing (SSuccFoo b) = SuccFoo (fromSing b)+ toSing ZeroFoo = SomeSing SZeroFoo+ toSing (SuccFoo b)+ = case toSing b :: SomeSing NatFoo of {+ SomeSing c -> SomeSing (SSuccFoo c) }+ instance SMyOrd NatFoo where+ sMycompare ::+ forall (t1 :: NatFoo) (t2 :: NatFoo).+ Sing t1+ -> Sing t2+ -> Sing (Apply (Apply (MycompareSym0 :: TyFun NatFoo (TyFun NatFoo Ordering+ -> GHC.Types.Type)+ -> GHC.Types.Type) t1 :: TyFun NatFoo Ordering+ -> GHC.Types.Type) t2 :: Ordering)+ sMycompare SZeroFoo SZeroFoo = SEQ+ sMycompare SZeroFoo (SSuccFoo _) = SLT+ sMycompare (SSuccFoo _) SZeroFoo = SGT+ sMycompare (SSuccFoo (sN :: Sing n)) (SSuccFoo (sM :: Sing m))+ = (applySing+ ((applySing ((singFun2 @MycompareSym0) sMycompare)) sM))+ sN+ instance SingI ZeroFoo where+ sing = SZeroFoo+ instance SingI n => SingI (SuccFoo (n :: NatFoo)) where+ sing = SSuccFoo sing
− tests/compile-and-dump/Singletons/Contains.ghc80.template
@@ -1,60 +0,0 @@-Singletons/Contains.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| contains :: Eq a => a -> [a] -> Bool- contains _ [] = False- contains elt (h : t) = (elt == h) || (contains elt t) |]- ======>- contains :: forall a. Eq a => a -> [a] -> Bool- contains _ GHC.Types.[] = False- contains elt (h GHC.Types.: t) = ((elt == h) || (contains elt t))- type ContainsSym2 (t :: a0123456789) (t :: [a0123456789]) =- Contains t t- instance SuppressUnusedWarnings ContainsSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ContainsSym1KindInference GHC.Tuple.())- data ContainsSym1 (l :: a0123456789)- (l :: TyFun [a0123456789] Bool)- = forall arg. KindOf (Apply (ContainsSym1 l) arg) ~ KindOf (ContainsSym2 l arg) =>- ContainsSym1KindInference- type instance Apply (ContainsSym1 l) l = ContainsSym2 l l- instance SuppressUnusedWarnings ContainsSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ContainsSym0KindInference GHC.Tuple.())- data ContainsSym0 (l :: TyFun a0123456789 (TyFun [a0123456789] Bool- -> GHC.Types.Type))- = forall arg. KindOf (Apply ContainsSym0 arg) ~ KindOf (ContainsSym1 arg) =>- ContainsSym0KindInference- type instance Apply ContainsSym0 l = ContainsSym1 l- type family Contains (a :: a) (a :: [a]) :: Bool where- Contains _z_0123456789 '[] = FalseSym0- Contains elt ((:) h t) = Apply (Apply (:||$) (Apply (Apply (:==$) elt) h)) (Apply (Apply ContainsSym0 elt) t)- sContains ::- forall (t :: a) (t :: [a]).- SEq a =>- Sing t -> Sing t -> Sing (Apply (Apply ContainsSym0 t) t :: Bool)- sContains _s_z_0123456789 SNil- = let- lambda ::- forall _z_0123456789.- (t ~ _z_0123456789, t ~ '[]) =>- Sing _z_0123456789 -> Sing (Apply (Apply ContainsSym0 t) t :: Bool)- lambda _z_0123456789 = SFalse- in lambda _s_z_0123456789- sContains sElt (SCons sH sT)- = let- lambda ::- forall elt h t.- (t ~ elt, t ~ Apply (Apply (:$) h) t) =>- Sing elt- -> Sing h- -> Sing t -> Sing (Apply (Apply ContainsSym0 t) t :: Bool)- lambda elt h t- = applySing- (applySing- (singFun2 (Proxy :: Proxy (:||$)) (%:||))- (applySing- (applySing (singFun2 (Proxy :: Proxy (:==$)) (%:==)) elt) h))- (applySing- (applySing (singFun2 (Proxy :: Proxy ContainsSym0) sContains) elt)- t)- in lambda sElt sH sT
+ tests/compile-and-dump/Singletons/Contains.ghc82.template view
@@ -0,0 +1,41 @@+Singletons/Contains.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| contains :: Eq a => a -> [a] -> Bool+ contains _ [] = False+ contains elt (h : t) = (elt == h) || (contains elt t) |]+ ======>+ contains :: Eq a => a -> [a] -> Bool+ contains _ GHC.Types.[] = False+ contains elt (h GHC.Types.: t) = ((elt == h) || ((contains elt) t))+ type ContainsSym2 (t :: a0123456789876543210) (t :: [a0123456789876543210]) =+ Contains t t+ instance SuppressUnusedWarnings ContainsSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ContainsSym1KindInference) GHC.Tuple.())+ data ContainsSym1 (l :: a0123456789876543210) (l :: TyFun [a0123456789876543210] Bool)+ = forall arg. SameKind (Apply (ContainsSym1 l) arg) (ContainsSym2 l arg) =>+ ContainsSym1KindInference+ type instance Apply (ContainsSym1 l) l = Contains l l+ instance SuppressUnusedWarnings ContainsSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ContainsSym0KindInference) GHC.Tuple.())+ data ContainsSym0 (l :: TyFun a0123456789876543210 (TyFun [a0123456789876543210] Bool+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply ContainsSym0 arg) (ContainsSym1 arg) =>+ ContainsSym0KindInference+ type instance Apply ContainsSym0 l = ContainsSym1 l+ type family Contains (a :: a) (a :: [a]) :: Bool where+ Contains _z_0123456789876543210 '[] = FalseSym0+ Contains elt ((:) h t) = Apply (Apply (:||$) (Apply (Apply (:==$) elt) h)) (Apply (Apply ContainsSym0 elt) t)+ sContains ::+ forall (t :: a) (t :: [a]).+ SEq a =>+ Sing t -> Sing t -> Sing (Apply (Apply ContainsSym0 t) t :: Bool)+ sContains _ SNil = SFalse+ sContains (sElt :: Sing elt) (SCons (sH :: Sing h) (sT :: Sing t))+ = (applySing+ ((applySing ((singFun2 @(:||$)) (%:||)))+ ((applySing ((applySing ((singFun2 @(:==$)) (%:==))) sElt)) sH)))+ ((applySing+ ((applySing ((singFun2 @ContainsSym0) sContains)) sElt))+ sT)
− tests/compile-and-dump/Singletons/DataValues.ghc80.template
@@ -1,102 +0,0 @@-Singletons/DataValues.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| pr = Pair (Succ Zero) ([Zero])- complex = Pair (Pair (Just Zero) Zero) False- tuple = (False, Just Zero, True)- aList = [Zero, Succ Zero, Succ (Succ Zero)]- - data Pair a b- = Pair a b- deriving (Show) |]- ======>- data Pair a b- = Pair a b- deriving (Show)- pr = Pair (Succ Zero) [Zero]- complex = Pair (Pair (Just Zero) Zero) False- tuple = (False, Just Zero, True)- aList = [Zero, Succ Zero, Succ (Succ Zero)]- type PairSym2 (t :: a0123456789) (t :: b0123456789) = Pair t t- instance SuppressUnusedWarnings PairSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) PairSym1KindInference GHC.Tuple.())- data PairSym1 (l :: a0123456789)- (l :: TyFun b0123456789 (Pair a0123456789 b0123456789))- = forall arg. KindOf (Apply (PairSym1 l) arg) ~ KindOf (PairSym2 l arg) =>- PairSym1KindInference- type instance Apply (PairSym1 l) l = PairSym2 l l- instance SuppressUnusedWarnings PairSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) PairSym0KindInference GHC.Tuple.())- data PairSym0 (l :: TyFun a0123456789 (TyFun b0123456789 (Pair a0123456789 b0123456789)- -> GHC.Types.Type))- = forall arg. KindOf (Apply PairSym0 arg) ~ KindOf (PairSym1 arg) =>- PairSym0KindInference- type instance Apply PairSym0 l = PairSym1 l- type AListSym0 = AList- type TupleSym0 = Tuple- type ComplexSym0 = Complex- type PrSym0 = Pr- type family AList where- AList = Apply (Apply (:$) ZeroSym0) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:$) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))) '[]))- type family Tuple where- Tuple = Apply (Apply (Apply Tuple3Sym0 FalseSym0) (Apply JustSym0 ZeroSym0)) TrueSym0- type family Complex where- Complex = Apply (Apply PairSym0 (Apply (Apply PairSym0 (Apply JustSym0 ZeroSym0)) ZeroSym0)) FalseSym0- type family Pr where- Pr = Apply (Apply PairSym0 (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:$) ZeroSym0) '[])- sAList :: Sing AListSym0- sTuple :: Sing TupleSym0- sComplex :: Sing ComplexSym0- sPr :: Sing PrSym0- sAList- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SZero)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero)))- SNil))- sTuple- = applySing- (applySing- (applySing (singFun3 (Proxy :: Proxy Tuple3Sym0) STuple3) SFalse)- (applySing (singFun1 (Proxy :: Proxy JustSym0) SJust) SZero))- STrue- sComplex- = applySing- (applySing- (singFun2 (Proxy :: Proxy PairSym0) SPair)- (applySing- (applySing- (singFun2 (Proxy :: Proxy PairSym0) SPair)- (applySing (singFun1 (Proxy :: Proxy JustSym0) SJust) SZero))- SZero))- SFalse- sPr- = applySing- (applySing- (singFun2 (Proxy :: Proxy PairSym0) SPair)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SZero) SNil)- data instance Sing (z :: Pair a b)- = forall (n :: a) (n :: b). z ~ Pair n n =>- SPair (Sing (n :: a)) (Sing (n :: b))- type SPair = (Sing :: Pair a b -> GHC.Types.Type)- instance (SingKind a, SingKind b) => SingKind (Pair a b) where- type DemoteRep (Pair a b) = Pair (DemoteRep a) (DemoteRep b)- fromSing (SPair b b) = Pair (fromSing b) (fromSing b)- toSing (Pair b b)- = case- GHC.Tuple.(,) (toSing b :: SomeSing a) (toSing b :: SomeSing b)- of {- GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing (SPair c c) }- instance (SingI n, SingI n) => SingI (Pair (n :: a) (n :: b)) where- sing = SPair sing sing
+ tests/compile-and-dump/Singletons/DataValues.ghc82.template view
@@ -0,0 +1,93 @@+Singletons/DataValues.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| pr = Pair (Succ Zero) ([Zero])+ complex = Pair (Pair (Just Zero) Zero) False+ tuple = (False, Just Zero, True)+ aList = [Zero, Succ Zero, Succ (Succ Zero)]+ + data Pair a b+ = Pair a b+ deriving Show |]+ ======>+ data Pair a b+ = Pair a b+ deriving Show+ pr = (Pair (Succ Zero)) [Zero]+ complex = (Pair ((Pair (Just Zero)) Zero)) False+ tuple = (False, Just Zero, True)+ aList = [Zero, Succ Zero, Succ (Succ Zero)]+ type PairSym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Pair t t+ instance SuppressUnusedWarnings PairSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) PairSym1KindInference) GHC.Tuple.())+ data PairSym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210))+ = forall arg. SameKind (Apply (PairSym1 l) arg) (PairSym2 l arg) =>+ PairSym1KindInference+ type instance Apply (PairSym1 l) l = Pair l l+ instance SuppressUnusedWarnings PairSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) PairSym0KindInference) GHC.Tuple.())+ data PairSym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) =>+ PairSym0KindInference+ type instance Apply PairSym0 l = PairSym1 l+ type AListSym0 = AList+ type TupleSym0 = Tuple+ type ComplexSym0 = Complex+ type PrSym0 = Pr+ type family AList where+ = Apply (Apply (:$) ZeroSym0) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:$) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))) '[]))+ type family Tuple where+ = Apply (Apply (Apply Tuple3Sym0 FalseSym0) (Apply JustSym0 ZeroSym0)) TrueSym0+ type family Complex where+ = Apply (Apply PairSym0 (Apply (Apply PairSym0 (Apply JustSym0 ZeroSym0)) ZeroSym0)) FalseSym0+ type family Pr where+ = Apply (Apply PairSym0 (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:$) ZeroSym0) '[])+ sAList :: Sing AListSym0+ sTuple :: Sing TupleSym0+ sComplex :: Sing ComplexSym0+ sPr :: Sing PrSym0+ sAList+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) SZero))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @SuccSym0) SSucc))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))+ SNil))+ sTuple+ = (applySing+ ((applySing ((applySing ((singFun3 @Tuple3Sym0) STuple3)) SFalse))+ ((applySing ((singFun1 @JustSym0) SJust)) SZero)))+ STrue+ sComplex+ = (applySing+ ((applySing ((singFun2 @PairSym0) SPair))+ ((applySing+ ((applySing ((singFun2 @PairSym0) SPair))+ ((applySing ((singFun1 @JustSym0) SJust)) SZero)))+ SZero)))+ SFalse+ sPr+ = (applySing+ ((applySing ((singFun2 @PairSym0) SPair))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SZero)) SNil)+ data instance Sing (z :: Pair a b)+ = forall (n :: a) (n :: b). z ~ Pair n n =>+ SPair (Sing (n :: a)) (Sing (n :: b))+ type SPair = (Sing :: Pair a b -> GHC.Types.Type)+ instance (SingKind a, SingKind b) => SingKind (Pair a b) where+ type Demote (Pair a b) = Pair (Demote a) (Demote b)+ fromSing (SPair b b) = (Pair (fromSing b)) (fromSing b)+ toSing (Pair b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing a)) (toSing b :: SomeSing b)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing ((SPair c) c) }+ instance (SingI n, SingI n) => SingI (Pair (n :: a) (n :: b)) where+ sing = (SPair sing) sing
− tests/compile-and-dump/Singletons/Empty.ghc80.template
@@ -1,14 +0,0 @@-Singletons/Empty.hs:(0,0)-(0,0): Splicing declarations- singletons [d| data Empty |]- ======>- data Empty- data instance Sing (z :: Empty)- type SEmpty = (Sing :: Empty -> GHC.Types.Type)- instance SingKind Empty where- type DemoteRep Empty = Empty- fromSing z- = case z of {- _ -> error "Empty case reached -- this should be impossible" }- toSing z- = case z of {- _ -> error "Empty case reached -- this should be impossible" }
+ tests/compile-and-dump/Singletons/Empty.ghc82.template view
@@ -0,0 +1,14 @@+Singletons/Empty.hs:(0,0)-(0,0): Splicing declarations+ singletons [d| data Empty |]+ ======>+ data Empty+ data instance Sing (z :: Empty)+ type SEmpty = (Sing :: Empty -> GHC.Types.Type)+ instance SingKind Empty where+ type Demote Empty = Empty+ fromSing z+ = case z of {+ _ -> error "Empty case reached -- this should be impossible" }+ toSing z+ = case z of {+ _ -> error "Empty case reached -- this should be impossible" }
− tests/compile-and-dump/Singletons/EnumDeriving.ghc80.template
@@ -1,284 +0,0 @@-Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| data Foo- = Bar | Baz | Bum- deriving (Enum)- data Quux = Q1 | Q2 |]- ======>- data Foo- = Bar | Baz | Bum- deriving (Enum)- data Quux = Q1 | Q2- type BarSym0 = Bar- type BazSym0 = Baz- type BumSym0 = Bum- type Q1Sym0 = Q1- type Q2Sym0 = Q2- type family Case_0123456789 n t where- Case_0123456789 n True = BumSym0- Case_0123456789 n False = Apply ErrorSym0 "toEnum: bad argument"- type family Case_0123456789 n t where- Case_0123456789 n True = BazSym0- Case_0123456789 n False = Case_0123456789 n (Apply (Apply (:==$) n) (FromInteger 2))- type family Case_0123456789 n t where- Case_0123456789 n True = BarSym0- Case_0123456789 n False = Case_0123456789 n (Apply (Apply (:==$) n) (FromInteger 1))- type family ToEnum_0123456789 (a :: GHC.Types.Nat) :: Foo where- ToEnum_0123456789 n = Case_0123456789 n (Apply (Apply (:==$) n) (FromInteger 0))- type ToEnum_0123456789Sym1 (t :: GHC.Types.Nat) =- ToEnum_0123456789 t- instance SuppressUnusedWarnings ToEnum_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) ToEnum_0123456789Sym0KindInference GHC.Tuple.())- data ToEnum_0123456789Sym0 (l :: TyFun GHC.Types.Nat Foo)- = forall arg. KindOf (Apply ToEnum_0123456789Sym0 arg) ~ KindOf (ToEnum_0123456789Sym1 arg) =>- ToEnum_0123456789Sym0KindInference- type instance Apply ToEnum_0123456789Sym0 l = ToEnum_0123456789Sym1 l- type family FromEnum_0123456789 (a :: Foo) :: GHC.Types.Nat where- FromEnum_0123456789 Bar = FromInteger 0- FromEnum_0123456789 Baz = FromInteger 1- FromEnum_0123456789 Bum = FromInteger 2- type FromEnum_0123456789Sym1 (t :: Foo) = FromEnum_0123456789 t- instance SuppressUnusedWarnings FromEnum_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) FromEnum_0123456789Sym0KindInference GHC.Tuple.())- data FromEnum_0123456789Sym0 (l :: TyFun Foo GHC.Types.Nat)- = forall arg. KindOf (Apply FromEnum_0123456789Sym0 arg) ~ KindOf (FromEnum_0123456789Sym1 arg) =>- FromEnum_0123456789Sym0KindInference- type instance Apply FromEnum_0123456789Sym0 l = FromEnum_0123456789Sym1 l- instance PEnum (Proxy :: Proxy Foo) where- type ToEnum (a :: GHC.Types.Nat) = Apply ToEnum_0123456789Sym0 a- type FromEnum (a :: Foo) = Apply FromEnum_0123456789Sym0 a- data instance Sing (z :: Foo)- = z ~ Bar => SBar | z ~ Baz => SBaz | z ~ Bum => SBum- type SFoo = (Sing :: Foo -> GHC.Types.Type)- instance SingKind Foo where- type DemoteRep Foo = Foo- fromSing SBar = Bar- fromSing SBaz = Baz- fromSing SBum = Bum- toSing Bar = SomeSing SBar- toSing Baz = SomeSing SBaz- toSing Bum = SomeSing SBum- data instance Sing (z :: Quux) = z ~ Q1 => SQ1 | z ~ Q2 => SQ2- type SQuux = (Sing :: Quux -> GHC.Types.Type)- instance SingKind Quux where- type DemoteRep Quux = Quux- fromSing SQ1 = Q1- fromSing SQ2 = Q2- toSing Q1 = SomeSing SQ1- toSing Q2 = SomeSing SQ2- instance SEnum Foo where- sToEnum ::- forall (t0 :: GHC.Types.Nat).- Sing t0- -> Sing (Apply (ToEnumSym0 :: TyFun GHC.Types.Nat Foo- -> GHC.Types.Type) t0 :: Foo)- sFromEnum ::- forall (t0 :: Foo).- Sing t0- -> Sing (Apply (FromEnumSym0 :: TyFun Foo GHC.Types.Nat- -> GHC.Types.Type) t0 :: GHC.Types.Nat)- sToEnum sN- = let- lambda ::- forall n. t0 ~ n => Sing n -> Sing (Apply ToEnumSym0 t0 :: Foo)- lambda n- = case- applySing- (applySing (singFun2 (Proxy :: Proxy (:==$)) (%:==)) n)- (sFromInteger (sing :: Sing 0))- of {- STrue- -> let- lambda ::- TrueSym0 ~ Apply (Apply (:==$) n) (FromInteger 0) =>- Sing (Case_0123456789 n TrueSym0 :: Foo)- lambda = SBar- in lambda- SFalse- -> let- lambda ::- FalseSym0 ~ Apply (Apply (:==$) n) (FromInteger 0) =>- Sing (Case_0123456789 n FalseSym0 :: Foo)- lambda- = case- applySing- (applySing (singFun2 (Proxy :: Proxy (:==$)) (%:==)) n)- (sFromInteger (sing :: Sing 1))- of {- STrue- -> let- lambda ::- TrueSym0 ~ Apply (Apply (:==$) n) (FromInteger 1) =>- Sing (Case_0123456789 n TrueSym0 :: Foo)- lambda = SBaz- in lambda- SFalse- -> let- lambda ::- FalseSym0 ~ Apply (Apply (:==$) n) (FromInteger 1) =>- Sing (Case_0123456789 n FalseSym0 :: Foo)- lambda- = case- applySing- (applySing- (singFun2 (Proxy :: Proxy (:==$)) (%:==)) n)- (sFromInteger (sing :: Sing 2))- of {- STrue- -> let- lambda ::- TrueSym0 ~ Apply (Apply (:==$) n) (FromInteger 2) =>- Sing (Case_0123456789 n TrueSym0 :: Foo)- lambda = SBum- in lambda- SFalse- -> let- lambda ::- FalseSym0 ~ Apply (Apply (:==$) n) (FromInteger 2) =>- Sing (Case_0123456789 n FalseSym0 :: Foo)- lambda- = sError (sing :: Sing "toEnum: bad argument")- in lambda } ::- Sing (Case_0123456789 n (Apply (Apply (:==$) n) (FromInteger 2)) :: Foo)- in lambda } ::- Sing (Case_0123456789 n (Apply (Apply (:==$) n) (FromInteger 1)) :: Foo)- in lambda } ::- Sing (Case_0123456789 n (Apply (Apply (:==$) n) (FromInteger 0)) :: Foo)- in lambda sN- sFromEnum SBar- = let- lambda ::- t0 ~ BarSym0 => Sing (Apply FromEnumSym0 t0 :: GHC.Types.Nat)- lambda = sFromInteger (sing :: Sing 0)- in lambda- sFromEnum SBaz- = let- lambda ::- t0 ~ BazSym0 => Sing (Apply FromEnumSym0 t0 :: GHC.Types.Nat)- lambda = sFromInteger (sing :: Sing 1)- in lambda- sFromEnum SBum- = let- lambda ::- t0 ~ BumSym0 => Sing (Apply FromEnumSym0 t0 :: GHC.Types.Nat)- lambda = sFromInteger (sing :: Sing 2)- in lambda- instance SingI Bar where- sing = SBar- instance SingI Baz where- sing = SBaz- instance SingI Bum where- sing = SBum- instance SingI Q1 where- sing = SQ1- instance SingI Q2 where- sing = SQ2-Singletons/EnumDeriving.hs:0:0:: Splicing declarations- singEnumInstance ''Quux- ======>- type family Case_0123456789 n t where- Case_0123456789 n True = Q2Sym0- Case_0123456789 n False = Apply ErrorSym0 "toEnum: bad argument"- type family Case_0123456789 n t where- Case_0123456789 n True = Q1Sym0- Case_0123456789 n False = Case_0123456789 n (Apply (Apply (:==$) n) (FromInteger 1))- type family ToEnum_0123456789 (a :: GHC.Types.Nat) :: Quux where- ToEnum_0123456789 n = Case_0123456789 n (Apply (Apply (:==$) n) (FromInteger 0))- type ToEnum_0123456789Sym1 (t :: GHC.Types.Nat) =- ToEnum_0123456789 t- instance SuppressUnusedWarnings ToEnum_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) ToEnum_0123456789Sym0KindInference GHC.Tuple.())- data ToEnum_0123456789Sym0 (l :: TyFun GHC.Types.Nat Quux)- = forall arg. KindOf (Apply ToEnum_0123456789Sym0 arg) ~ KindOf (ToEnum_0123456789Sym1 arg) =>- ToEnum_0123456789Sym0KindInference- type instance Apply ToEnum_0123456789Sym0 l = ToEnum_0123456789Sym1 l- type family FromEnum_0123456789 (a :: Quux) :: GHC.Types.Nat where- FromEnum_0123456789 Q1 = FromInteger 0- FromEnum_0123456789 Q2 = FromInteger 1- type FromEnum_0123456789Sym1 (t :: Quux) = FromEnum_0123456789 t- instance SuppressUnusedWarnings FromEnum_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) FromEnum_0123456789Sym0KindInference GHC.Tuple.())- data FromEnum_0123456789Sym0 (l :: TyFun Quux GHC.Types.Nat)- = forall arg. KindOf (Apply FromEnum_0123456789Sym0 arg) ~ KindOf (FromEnum_0123456789Sym1 arg) =>- FromEnum_0123456789Sym0KindInference- type instance Apply FromEnum_0123456789Sym0 l = FromEnum_0123456789Sym1 l- instance PEnum (Proxy :: Proxy Quux) where- type ToEnum (a :: GHC.Types.Nat) = Apply ToEnum_0123456789Sym0 a- type FromEnum (a :: Quux) = Apply FromEnum_0123456789Sym0 a- instance SEnum Quux where- sToEnum ::- forall (t0 :: GHC.Types.Nat).- Sing t0- -> Sing (Apply (ToEnumSym0 :: TyFun GHC.Types.Nat Quux- -> GHC.Types.Type) t0 :: Quux)- sFromEnum ::- forall (t0 :: Quux).- Sing t0- -> Sing (Apply (FromEnumSym0 :: TyFun Quux GHC.Types.Nat- -> GHC.Types.Type) t0 :: GHC.Types.Nat)- sToEnum sN- = let- lambda ::- forall n. t0 ~ n => Sing n -> Sing (Apply ToEnumSym0 t0 :: Quux)- lambda n- = case- applySing- (applySing (singFun2 (Proxy :: Proxy (:==$)) (%:==)) n)- (sFromInteger (sing :: Sing 0))- of {- STrue- -> let- lambda ::- TrueSym0 ~ Apply (Apply (:==$) n) (FromInteger 0) =>- Sing (Case_0123456789 n TrueSym0 :: Quux)- lambda = SQ1- in lambda- SFalse- -> let- lambda ::- FalseSym0 ~ Apply (Apply (:==$) n) (FromInteger 0) =>- Sing (Case_0123456789 n FalseSym0 :: Quux)- lambda- = case- applySing- (applySing (singFun2 (Proxy :: Proxy (:==$)) (%:==)) n)- (sFromInteger (sing :: Sing 1))- of {- STrue- -> let- lambda ::- TrueSym0 ~ Apply (Apply (:==$) n) (FromInteger 1) =>- Sing (Case_0123456789 n TrueSym0 :: Quux)- lambda = SQ2- in lambda- SFalse- -> let- lambda ::- FalseSym0 ~ Apply (Apply (:==$) n) (FromInteger 1) =>- Sing (Case_0123456789 n FalseSym0 :: Quux)- lambda = sError (sing :: Sing "toEnum: bad argument")- in lambda } ::- Sing (Case_0123456789 n (Apply (Apply (:==$) n) (FromInteger 1)) :: Quux)- in lambda } ::- Sing (Case_0123456789 n (Apply (Apply (:==$) n) (FromInteger 0)) :: Quux)- in lambda sN- sFromEnum SQ1- = let- lambda ::- t0 ~ Q1Sym0 => Sing (Apply FromEnumSym0 t0 :: GHC.Types.Nat)- lambda = sFromInteger (sing :: Sing 0)- in lambda- sFromEnum SQ2- = let- lambda ::- t0 ~ Q2Sym0 => Sing (Apply FromEnumSym0 t0 :: GHC.Types.Nat)- lambda = sFromInteger (sing :: Sing 1)- in lambda
+ tests/compile-and-dump/Singletons/EnumDeriving.ghc82.template view
@@ -0,0 +1,188 @@+Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| data Foo+ = Bar | Baz | Bum+ deriving Enum+ data Quux = Q1 | Q2 |]+ ======>+ data Foo+ = Bar | Baz | Bum+ deriving Enum+ data Quux = Q1 | Q2+ type BarSym0 = Bar+ type BazSym0 = Baz+ type BumSym0 = Bum+ type Q1Sym0 = Q1+ type Q2Sym0 = Q2+ type family Case_0123456789876543210 n t where+ Case_0123456789876543210 n True = BumSym0+ Case_0123456789876543210 n False = Apply ErrorSym0 "toEnum: bad argument"+ type family Case_0123456789876543210 n t where+ Case_0123456789876543210 n True = BazSym0+ Case_0123456789876543210 n False = Case_0123456789876543210 n (Apply (Apply (:==$) n) (FromInteger 2))+ type family Case_0123456789876543210 n t where+ Case_0123456789876543210 n True = BarSym0+ Case_0123456789876543210 n False = Case_0123456789876543210 n (Apply (Apply (:==$) n) (FromInteger 1))+ type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: Foo where+ ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (:==$) n) (FromInteger 0))+ type ToEnum_0123456789876543210Sym1 (t :: GHC.Types.Nat) =+ ToEnum_0123456789876543210 t+ instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) ToEnum_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data ToEnum_0123456789876543210Sym0 (l :: TyFun GHC.Types.Nat Foo)+ = forall arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>+ ToEnum_0123456789876543210Sym0KindInference+ type instance Apply ToEnum_0123456789876543210Sym0 l = ToEnum_0123456789876543210 l+ type family FromEnum_0123456789876543210 (a :: Foo) :: GHC.Types.Nat where+ FromEnum_0123456789876543210 Bar = FromInteger 0+ FromEnum_0123456789876543210 Baz = FromInteger 1+ FromEnum_0123456789876543210 Bum = FromInteger 2+ type FromEnum_0123456789876543210Sym1 (t :: Foo) =+ FromEnum_0123456789876543210 t+ instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) FromEnum_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data FromEnum_0123456789876543210Sym0 (l :: TyFun Foo GHC.Types.Nat)+ = forall arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>+ FromEnum_0123456789876543210Sym0KindInference+ type instance Apply FromEnum_0123456789876543210Sym0 l = FromEnum_0123456789876543210 l+ instance PEnum Foo where+ type ToEnum (a :: GHC.Types.Nat) = Apply ToEnum_0123456789876543210Sym0 a+ type FromEnum (a :: Foo) = Apply FromEnum_0123456789876543210Sym0 a+ data instance Sing (z :: Foo)+ = z ~ Bar => SBar | z ~ Baz => SBaz | z ~ Bum => SBum+ type SFoo = (Sing :: Foo -> GHC.Types.Type)+ instance SingKind Foo where+ type Demote Foo = Foo+ fromSing SBar = Bar+ fromSing SBaz = Baz+ fromSing SBum = Bum+ toSing Bar = SomeSing SBar+ toSing Baz = SomeSing SBaz+ toSing Bum = SomeSing SBum+ data instance Sing (z :: Quux) = z ~ Q1 => SQ1 | z ~ Q2 => SQ2+ type SQuux = (Sing :: Quux -> GHC.Types.Type)+ instance SingKind Quux where+ type Demote Quux = Quux+ fromSing SQ1 = Q1+ fromSing SQ2 = Q2+ toSing Q1 = SomeSing SQ1+ toSing Q2 = SomeSing SQ2+ instance SEnum Foo where+ sToEnum ::+ forall (t :: GHC.Types.Nat).+ Sing t+ -> Sing (Apply (ToEnumSym0 :: TyFun GHC.Types.Nat Foo+ -> GHC.Types.Type) t :: Foo)+ sFromEnum ::+ forall (t :: Foo).+ Sing t+ -> Sing (Apply (FromEnumSym0 :: TyFun Foo GHC.Types.Nat+ -> GHC.Types.Type) t :: GHC.Types.Nat)+ sToEnum (sN :: Sing n)+ = case+ (applySing ((applySing ((singFun2 @(:==$)) (%:==))) sN))+ (sFromInteger (sing :: Sing 0))+ of+ STrue -> SBar+ SFalse+ -> case+ (applySing ((applySing ((singFun2 @(:==$)) (%:==))) sN))+ (sFromInteger (sing :: Sing 1))+ of+ STrue -> SBaz+ SFalse+ -> case+ (applySing ((applySing ((singFun2 @(:==$)) (%:==))) sN))+ (sFromInteger (sing :: Sing 2))+ of+ STrue -> SBum+ SFalse -> sError (sing :: Sing "toEnum: bad argument") ::+ Sing (Case_0123456789876543210 n (Apply (Apply (:==$) n) (FromInteger 2)) :: Foo) ::+ Sing (Case_0123456789876543210 n (Apply (Apply (:==$) n) (FromInteger 1)) :: Foo) ::+ Sing (Case_0123456789876543210 n (Apply (Apply (:==$) n) (FromInteger 0)) :: Foo)+ sFromEnum SBar = sFromInteger (sing :: Sing 0)+ sFromEnum SBaz = sFromInteger (sing :: Sing 1)+ sFromEnum SBum = sFromInteger (sing :: Sing 2)+ instance SingI Bar where+ sing = SBar+ instance SingI Baz where+ sing = SBaz+ instance SingI Bum where+ sing = SBum+ instance SingI Q1 where+ sing = SQ1+ instance SingI Q2 where+ sing = SQ2+Singletons/EnumDeriving.hs:0:0:: Splicing declarations+ singEnumInstance ''Quux+ ======>+ type family Case_0123456789876543210 n t where+ Case_0123456789876543210 n True = Q2Sym0+ Case_0123456789876543210 n False = Apply ErrorSym0 "toEnum: bad argument"+ type family Case_0123456789876543210 n t where+ Case_0123456789876543210 n True = Q1Sym0+ Case_0123456789876543210 n False = Case_0123456789876543210 n (Apply (Apply (:==$) n) (FromInteger 1))+ type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: Quux where+ ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (:==$) n) (FromInteger 0))+ type ToEnum_0123456789876543210Sym1 (t :: GHC.Types.Nat) =+ ToEnum_0123456789876543210 t+ instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) ToEnum_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data ToEnum_0123456789876543210Sym0 (l :: TyFun GHC.Types.Nat Quux)+ = forall arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>+ ToEnum_0123456789876543210Sym0KindInference+ type instance Apply ToEnum_0123456789876543210Sym0 l = ToEnum_0123456789876543210 l+ type family FromEnum_0123456789876543210 (a :: Quux) :: GHC.Types.Nat where+ FromEnum_0123456789876543210 Q1 = FromInteger 0+ FromEnum_0123456789876543210 Q2 = FromInteger 1+ type FromEnum_0123456789876543210Sym1 (t :: Quux) =+ FromEnum_0123456789876543210 t+ instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) FromEnum_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data FromEnum_0123456789876543210Sym0 (l :: TyFun Quux GHC.Types.Nat)+ = forall arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>+ FromEnum_0123456789876543210Sym0KindInference+ type instance Apply FromEnum_0123456789876543210Sym0 l = FromEnum_0123456789876543210 l+ instance PEnum Quux where+ type ToEnum (a :: GHC.Types.Nat) = Apply ToEnum_0123456789876543210Sym0 a+ type FromEnum (a :: Quux) = Apply FromEnum_0123456789876543210Sym0 a+ instance SEnum Quux where+ sToEnum ::+ forall (t :: GHC.Types.Nat).+ Sing t+ -> Sing (Apply (ToEnumSym0 :: TyFun GHC.Types.Nat Quux+ -> GHC.Types.Type) t :: Quux)+ sFromEnum ::+ forall (t :: Quux).+ Sing t+ -> Sing (Apply (FromEnumSym0 :: TyFun Quux GHC.Types.Nat+ -> GHC.Types.Type) t :: GHC.Types.Nat)+ sToEnum (sN :: Sing n)+ = case+ (applySing ((applySing ((singFun2 @(:==$)) (%:==))) sN))+ (sFromInteger (sing :: Sing 0))+ of+ STrue -> SQ1+ SFalse+ -> case+ (applySing ((applySing ((singFun2 @(:==$)) (%:==))) sN))+ (sFromInteger (sing :: Sing 1))+ of+ STrue -> SQ2+ SFalse -> sError (sing :: Sing "toEnum: bad argument") ::+ Sing (Case_0123456789876543210 n (Apply (Apply (:==$) n) (FromInteger 1)) :: Quux) ::+ Sing (Case_0123456789876543210 n (Apply (Apply (:==$) n) (FromInteger 0)) :: Quux)+ sFromEnum SQ1 = sFromInteger (sing :: Sing 0)+ sFromEnum SQ2 = sFromInteger (sing :: Sing 1)
− tests/compile-and-dump/Singletons/EqInstances.ghc80.template
@@ -1,23 +0,0 @@-Singletons/EqInstances.hs:0:0:: Splicing declarations- singEqInstances [''Foo, ''Empty]- ======>- instance SEq Foo where- (%:==) SFLeaf SFLeaf = STrue- (%:==) SFLeaf ((:%+:) _ _) = SFalse- (%:==) ((:%+:) _ _) SFLeaf = SFalse- (%:==) ((:%+:) a a) ((:%+:) b b) = (%:&&) ((%:==) a b) ((%:==) a b)- type family Equals_0123456789 (a :: Foo) (b :: Foo) :: Bool where- Equals_0123456789 FLeaf FLeaf = TrueSym0- Equals_0123456789 ((:+:) a a) ((:+:) b b) = (:&&) ((:==) a b) ((:==) a b)- Equals_0123456789 (a :: Foo) (b :: Foo) = FalseSym0- instance PEq (Proxy :: Proxy Foo) where- type (:==) (a :: Foo) (b :: Foo) = Equals_0123456789 a b- instance SEq Empty where- (%:==) a _- = case a of {- _ -> error "Empty case reached -- this should be impossible" }- type family Equals_0123456789 (a :: Empty)- (b :: Empty) :: Bool where- Equals_0123456789 (a :: Empty) (b :: Empty) = FalseSym0- instance PEq (Proxy :: Proxy Empty) where- type (:==) (a :: Empty) (b :: Empty) = Equals_0123456789 a b
+ tests/compile-and-dump/Singletons/EqInstances.ghc82.template view
@@ -0,0 +1,23 @@+Singletons/EqInstances.hs:0:0:: Splicing declarations+ singEqInstances [''Foo, ''Empty]+ ======>+ instance SEq Foo where+ (%:==) SFLeaf SFLeaf = STrue+ (%:==) SFLeaf ((:%+:) _ _) = SFalse+ (%:==) ((:%+:) _ _) SFLeaf = SFalse+ (%:==) ((:%+:) a a) ((:%+:) b b)+ = ((%:&&) (((%:==) a) b)) (((%:==) a) b)+ type family Equals_0123456789876543210 (a :: Foo) (b :: Foo) :: Bool where+ Equals_0123456789876543210 FLeaf FLeaf = TrueSym0+ Equals_0123456789876543210 ((:+:) a a) ((:+:) b b) = (:&&) ((:==) a b) ((:==) a b)+ Equals_0123456789876543210 (a :: Foo) (b :: Foo) = FalseSym0+ instance PEq Foo where+ type (:==) (a :: Foo) (b :: Foo) = Equals_0123456789876543210 a b+ instance SEq Empty where+ (%:==) a _+ = case a of {+ _ -> error "Empty case reached -- this should be impossible" }+ type family Equals_0123456789876543210 (a :: Empty) (b :: Empty) :: Bool where+ Equals_0123456789876543210 (a :: Empty) (b :: Empty) = FalseSym0+ instance PEq Empty where+ type (:==) (a :: Empty) (b :: Empty) = Equals_0123456789876543210 a b
− tests/compile-and-dump/Singletons/Error.ghc80.template
@@ -1,35 +0,0 @@-Singletons/Error.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| head :: [a] -> a- head (a : _) = a- head [] = error "Data.Singletons.List.head: empty list" |]- ======>- head :: forall a. [a] -> a- head (a GHC.Types.: _) = a- head GHC.Types.[] = error "Data.Singletons.List.head: empty list"- type HeadSym1 (t :: [a0123456789]) = Head t- instance SuppressUnusedWarnings HeadSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) HeadSym0KindInference GHC.Tuple.())- data HeadSym0 (l :: TyFun [a0123456789] a0123456789)- = forall arg. KindOf (Apply HeadSym0 arg) ~ KindOf (HeadSym1 arg) =>- HeadSym0KindInference- type instance Apply HeadSym0 l = HeadSym1 l- type family Head (a :: [a]) :: a where- Head ((:) a _z_0123456789) = a- Head '[] = Apply ErrorSym0 "Data.Singletons.List.head: empty list"- sHead :: forall (t :: [a]). Sing t -> Sing (Apply HeadSym0 t :: a)- sHead (SCons sA _s_z_0123456789)- = let- lambda ::- forall a _z_0123456789.- t ~ Apply (Apply (:$) a) _z_0123456789 =>- Sing a -> Sing _z_0123456789 -> Sing (Apply HeadSym0 t :: a)- lambda a _z_0123456789 = a- in lambda sA _s_z_0123456789- sHead SNil- = let- lambda :: t ~ '[] => Sing (Apply HeadSym0 t :: a)- lambda- = sError (sing :: Sing "Data.Singletons.List.head: empty list")- in lambda
+ tests/compile-and-dump/Singletons/Error.ghc82.template view
@@ -0,0 +1,24 @@+Singletons/Error.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| head :: [a] -> a+ head (a : _) = a+ head [] = error "Data.Singletons.List.head: empty list" |]+ ======>+ head :: [a] -> a+ head (a GHC.Types.: _) = a+ head GHC.Types.[] = error "Data.Singletons.List.head: empty list"+ type HeadSym1 (t :: [a0123456789876543210]) = Head t+ instance SuppressUnusedWarnings HeadSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) HeadSym0KindInference) GHC.Tuple.())+ data HeadSym0 (l :: TyFun [a0123456789876543210] a0123456789876543210)+ = forall arg. SameKind (Apply HeadSym0 arg) (HeadSym1 arg) =>+ HeadSym0KindInference+ type instance Apply HeadSym0 l = Head l+ type family Head (a :: [a]) :: a where+ Head ((:) a _z_0123456789876543210) = a+ Head '[] = Apply ErrorSym0 "Data.Singletons.List.head: empty list"+ sHead :: forall (t :: [a]). Sing t -> Sing (Apply HeadSym0 t :: a)+ sHead (SCons (sA :: Sing a) _) = sA+ sHead SNil+ = sError (sing :: Sing "Data.Singletons.List.head: empty list")
− tests/compile-and-dump/Singletons/Fixity.ghc80.template
@@ -1,75 +0,0 @@-Singletons/Fixity.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| infix 4 ====- infix 4 <=>- - (====) :: a -> a -> a- a ==== _ = a- - class MyOrd a where- (<=>) :: a -> a -> Ordering- infix 4 <=> |]- ======>- class MyOrd a where- (<=>) :: a -> a -> Ordering- infix 4 <=>- (====) :: forall a. a -> a -> a- (====) a _ = a- infix 4 ====- type (:====$$$) (t :: a0123456789) (t :: a0123456789) = (:====) t t- instance SuppressUnusedWarnings (:====$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:====$$###) GHC.Tuple.())- data (:====$$) (l :: a0123456789)- (l :: TyFun a0123456789 a0123456789)- = forall arg. KindOf (Apply ((:====$$) l) arg) ~ KindOf ((:====$$$) l arg) =>- (:====$$###)- type instance Apply ((:====$$) l) l = (:====$$$) l l- instance SuppressUnusedWarnings (:====$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:====$###) GHC.Tuple.())- data (:====$) (l :: TyFun a0123456789 (TyFun a0123456789 a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply (:====$) arg) ~ KindOf ((:====$$) arg) =>- (:====$###)- type instance Apply (:====$) l = (:====$$) l- type family (:====) (a :: a) (a :: a) :: a where- (:====) a _z_0123456789 = a- infix 4 :====- infix 4 :<=>- type (:<=>$$$) (t :: a0123456789) (t :: a0123456789) = (:<=>) t t- instance SuppressUnusedWarnings (:<=>$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<=>$$###) GHC.Tuple.())- data (:<=>$$) (l :: a0123456789) (l :: TyFun a0123456789 Ordering)- = forall arg. KindOf (Apply ((:<=>$$) l) arg) ~ KindOf ((:<=>$$$) l arg) =>- (:<=>$$###)- type instance Apply ((:<=>$$) l) l = (:<=>$$$) l l- instance SuppressUnusedWarnings (:<=>$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<=>$###) GHC.Tuple.())- data (:<=>$) (l :: TyFun a0123456789 (TyFun a0123456789 Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply (:<=>$) arg) ~ KindOf ((:<=>$$) arg) =>- (:<=>$###)- type instance Apply (:<=>$) l = (:<=>$$) l- class kproxy ~ Proxy => PMyOrd (kproxy :: Proxy a) where- type (:<=>) (arg :: a) (arg :: a) :: Ordering- infix 4 %:====- infix 4 %:<=>- (%:====) ::- forall (t :: a) (t :: a).- Sing t -> Sing t -> Sing (Apply (Apply (:====$) t) t :: a)- (%:====) sA _s_z_0123456789- = let- lambda ::- forall a _z_0123456789.- (t ~ a, t ~ _z_0123456789) =>- Sing a- -> Sing _z_0123456789 -> Sing (Apply (Apply (:====$) t) t :: a)- lambda a _z_0123456789 = a- in lambda sA _s_z_0123456789- class SMyOrd a where- (%:<=>) ::- forall (t :: a) (t :: a).- Sing t -> Sing t -> Sing (Apply (Apply (:<=>$) t) t :: Ordering)
+ tests/compile-and-dump/Singletons/Fixity.ghc82.template view
@@ -0,0 +1,68 @@+Singletons/Fixity.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| infix 4 ====+ infix 4 <=>+ + (====) :: a -> a -> a+ a ==== _ = a+ + class MyOrd a where+ (<=>) :: a -> a -> Ordering+ infix 4 <=> |]+ ======>+ class MyOrd a where+ (<=>) :: a -> a -> Ordering+ infix 4 <=>+ (====) :: a -> a -> a+ (====) a _ = a+ infix 4 ====+ type (:====$$$) (t :: a0123456789876543210) (t :: a0123456789876543210) =+ (:====) t t+ instance SuppressUnusedWarnings (:====$$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:====$$###)) GHC.Tuple.())+ data (:====$$) (l :: a0123456789876543210) (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply ((:====$$) l) arg) ((:====$$$) l arg) =>+ (:====$$###)+ type instance Apply ((:====$$) l) l = (:====) l l+ instance SuppressUnusedWarnings (:====$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:====$###)) GHC.Tuple.())+ data (:====$) (l :: TyFun a0123456789876543210 (TyFun a0123456789876543210 a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (:====$) arg) ((:====$$) arg) =>+ (:====$###)+ type instance Apply (:====$) l = (:====$$) l+ type family (:====) (a :: a) (a :: a) :: a where+ (:====) a _z_0123456789876543210 = a+ infix 4 :====+ infix 4 :<=>+ type (:<=>$$$) (t :: a0123456789876543210) (t :: a0123456789876543210) =+ (:<=>) t t+ instance SuppressUnusedWarnings (:<=>$$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:<=>$$###)) GHC.Tuple.())+ data (:<=>$$) (l :: a0123456789876543210) (l :: TyFun a0123456789876543210 Ordering)+ = forall arg. SameKind (Apply ((:<=>$$) l) arg) ((:<=>$$$) l arg) =>+ (:<=>$$###)+ type instance Apply ((:<=>$$) l) l = (:<=>) l l+ instance SuppressUnusedWarnings (:<=>$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:<=>$###)) GHC.Tuple.())+ data (:<=>$) (l :: TyFun a0123456789876543210 (TyFun a0123456789876543210 Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (:<=>$) arg) ((:<=>$$) arg) =>+ (:<=>$###)+ type instance Apply (:<=>$) l = (:<=>$$) l+ class PMyOrd (a :: GHC.Types.Type) where+ type (:<=>) (arg :: a) (arg :: a) :: Ordering+ infix 4 %:====+ infix 4 %:<=>+ (%:====) ::+ forall (t :: a) (t :: a).+ Sing t -> Sing t -> Sing (Apply (Apply (:====$) t) t :: a)+ (%:====) (sA :: Sing a) _ = sA+ class SMyOrd a where+ (%:<=>) ::+ forall (t :: a) (t :: a).+ Sing t -> Sing t -> Sing (Apply (Apply (:<=>$) t) t :: Ordering)
− tests/compile-and-dump/Singletons/FunDeps.ghc80.template
@@ -1,96 +0,0 @@-Singletons/FunDeps.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| t1 = meth True- - class FD a b | a -> b where- meth :: a -> a- l2r :: a -> b- - instance FD Bool Nat where- meth = not- l2r False = 0- l2r True = 1 |]- ======>- class FD a b | a -> b where- meth :: a -> a- l2r :: a -> b- instance FD Bool Nat where- meth = not- l2r False = 0- l2r True = 1- t1 = meth True- type T1Sym0 = T1- type family T1 where- T1 = Apply MethSym0 TrueSym0- type MethSym1 (t :: a0123456789) = Meth t- instance SuppressUnusedWarnings MethSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) MethSym0KindInference GHC.Tuple.())- data MethSym0 (l :: TyFun a0123456789 a0123456789)- = forall arg. KindOf (Apply MethSym0 arg) ~ KindOf (MethSym1 arg) =>- MethSym0KindInference- type instance Apply MethSym0 l = MethSym1 l- type L2rSym1 (t :: a0123456789) = L2r t- instance SuppressUnusedWarnings L2rSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) L2rSym0KindInference GHC.Tuple.())- data L2rSym0 (l :: TyFun a0123456789 b0123456789)- = forall arg. KindOf (Apply L2rSym0 arg) ~ KindOf (L2rSym1 arg) =>- L2rSym0KindInference- type instance Apply L2rSym0 l = L2rSym1 l- class (kproxy ~ Proxy, kproxy ~ Proxy) => PFD (kproxy :: Proxy a)- (kproxy :: Proxy b) | a -> b where- type Meth (arg :: a) :: a- type L2r (arg :: a) :: b- type family Meth_0123456789 (a :: Bool) :: Bool where- Meth_0123456789 a_0123456789 = Apply NotSym0 a_0123456789- type Meth_0123456789Sym1 (t :: Bool) = Meth_0123456789 t- instance SuppressUnusedWarnings Meth_0123456789Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Meth_0123456789Sym0KindInference GHC.Tuple.())- data Meth_0123456789Sym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply Meth_0123456789Sym0 arg) ~ KindOf (Meth_0123456789Sym1 arg) =>- Meth_0123456789Sym0KindInference- type instance Apply Meth_0123456789Sym0 l = Meth_0123456789Sym1 l- type family L2r_0123456789 (a :: Bool) :: Nat where- L2r_0123456789 False = FromInteger 0- L2r_0123456789 True = FromInteger 1- type L2r_0123456789Sym1 (t :: Bool) = L2r_0123456789 t- instance SuppressUnusedWarnings L2r_0123456789Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) L2r_0123456789Sym0KindInference GHC.Tuple.())- data L2r_0123456789Sym0 (l :: TyFun Bool Nat)- = forall arg. KindOf (Apply L2r_0123456789Sym0 arg) ~ KindOf (L2r_0123456789Sym1 arg) =>- L2r_0123456789Sym0KindInference- type instance Apply L2r_0123456789Sym0 l = L2r_0123456789Sym1 l- instance PFD (Proxy :: Proxy Bool) (Proxy :: Proxy Nat) where- type Meth (a :: Bool) = Apply Meth_0123456789Sym0 a- type L2r (a :: Bool) = Apply L2r_0123456789Sym0 a- sT1 :: Sing T1Sym0- sT1 = applySing (singFun1 (Proxy :: Proxy MethSym0) sMeth) STrue- class SFD a b | a -> b where- sMeth :: forall (t :: a). Sing t -> Sing (Apply MethSym0 t :: a)- sL2r :: forall (t :: a). Sing t -> Sing (Apply L2rSym0 t :: b)- instance SFD Bool Nat where- sMeth ::- forall (t :: Bool). Sing t -> Sing (Apply MethSym0 t :: Bool)- sL2r :: forall (t :: Bool). Sing t -> Sing (Apply L2rSym0 t :: Nat)- sMeth sA_0123456789- = let- lambda ::- forall a_0123456789.- t ~ a_0123456789 =>- Sing a_0123456789 -> Sing (Apply MethSym0 t :: Bool)- lambda a_0123456789- = applySing (singFun1 (Proxy :: Proxy NotSym0) sNot) a_0123456789- in lambda sA_0123456789- sL2r SFalse- = let- lambda :: t ~ FalseSym0 => Sing (Apply L2rSym0 t :: Nat)- lambda = sFromInteger (sing :: Sing 0)- in lambda- sL2r STrue- = let- lambda :: t ~ TrueSym0 => Sing (Apply L2rSym0 t :: Nat)- lambda = sFromInteger (sing :: Sing 1)- in lambda
+ tests/compile-and-dump/Singletons/FunDeps.ghc82.template view
@@ -0,0 +1,86 @@+Singletons/FunDeps.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| t1 = meth True+ + class FD a b | a -> b where+ meth :: a -> a+ l2r :: a -> b+ + instance FD Bool Nat where+ meth = not+ l2r False = 0+ l2r True = 1 |]+ ======>+ class FD a b | a -> b where+ meth :: a -> a+ l2r :: a -> b+ instance FD Bool Nat where+ meth = not+ l2r False = 0+ l2r True = 1+ t1 = meth True+ type T1Sym0 = T1+ type family T1 where+ = Apply MethSym0 TrueSym0+ type MethSym1 (t :: a0123456789876543210) = Meth t+ instance SuppressUnusedWarnings MethSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) MethSym0KindInference) GHC.Tuple.())+ data MethSym0 (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply MethSym0 arg) (MethSym1 arg) =>+ MethSym0KindInference+ type instance Apply MethSym0 l = Meth l+ type L2rSym1 (t :: a0123456789876543210) = L2r t+ instance SuppressUnusedWarnings L2rSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) L2rSym0KindInference) GHC.Tuple.())+ data L2rSym0 (l :: TyFun a0123456789876543210 b0123456789876543210)+ = forall arg. SameKind (Apply L2rSym0 arg) (L2rSym1 arg) =>+ L2rSym0KindInference+ type instance Apply L2rSym0 l = L2r l+ class PFD (a :: GHC.Types.Type) (b :: GHC.Types.Type) | a -> b where+ type Meth (arg :: a) :: a+ type L2r (arg :: a) :: b+ type family Meth_0123456789876543210 (a :: Bool) :: Bool where+ Meth_0123456789876543210 a_0123456789876543210 = Apply NotSym0 a_0123456789876543210+ type Meth_0123456789876543210Sym1 (t :: Bool) =+ Meth_0123456789876543210 t+ instance SuppressUnusedWarnings Meth_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Meth_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Meth_0123456789876543210Sym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply Meth_0123456789876543210Sym0 arg) (Meth_0123456789876543210Sym1 arg) =>+ Meth_0123456789876543210Sym0KindInference+ type instance Apply Meth_0123456789876543210Sym0 l = Meth_0123456789876543210 l+ type family L2r_0123456789876543210 (a :: Bool) :: Nat where+ L2r_0123456789876543210 False = FromInteger 0+ L2r_0123456789876543210 True = FromInteger 1+ type L2r_0123456789876543210Sym1 (t :: Bool) =+ L2r_0123456789876543210 t+ instance SuppressUnusedWarnings L2r_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) L2r_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data L2r_0123456789876543210Sym0 (l :: TyFun Bool Nat)+ = forall arg. SameKind (Apply L2r_0123456789876543210Sym0 arg) (L2r_0123456789876543210Sym1 arg) =>+ L2r_0123456789876543210Sym0KindInference+ type instance Apply L2r_0123456789876543210Sym0 l = L2r_0123456789876543210 l+ instance PFD Bool Nat where+ type Meth (a :: Bool) = Apply Meth_0123456789876543210Sym0 a+ type L2r (a :: Bool) = Apply L2r_0123456789876543210Sym0 a+ sT1 :: Sing T1Sym0+ sT1 = (applySing ((singFun1 @MethSym0) sMeth)) STrue+ class SFD a b | a -> b where+ sMeth :: forall (t :: a). Sing t -> Sing (Apply MethSym0 t :: a)+ sL2r :: forall (t :: a). Sing t -> Sing (Apply L2rSym0 t :: b)+ instance SFD Bool Nat where+ sMeth ::+ forall (t :: Bool). Sing t -> Sing (Apply MethSym0 t :: Bool)+ sL2r :: forall (t :: Bool). Sing t -> Sing (Apply L2rSym0 t :: Nat)+ sMeth (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing ((singFun1 @NotSym0) sNot)) sA_0123456789876543210+ sL2r SFalse = sFromInteger (sing :: Sing 0)+ sL2r STrue = sFromInteger (sing :: Sing 1)
− tests/compile-and-dump/Singletons/HigherOrder.ghc80.template
@@ -1,573 +0,0 @@-Singletons/HigherOrder.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| map :: (a -> b) -> [a] -> [b]- map _ [] = []- map f (h : t) = (f h) : (map f t)- liftMaybe :: (a -> b) -> Maybe a -> Maybe b- liftMaybe f (Just x) = Just (f x)- liftMaybe _ Nothing = Nothing- zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]- zipWith f (x : xs) (y : ys) = f x y : zipWith f xs ys- zipWith _ [] [] = []- zipWith _ (_ : _) [] = []- zipWith _ [] (_ : _) = []- foo :: ((a -> b) -> a -> b) -> (a -> b) -> a -> b- foo f g a = f g a- splunge :: [Nat] -> [Bool] -> [Nat]- splunge ns bs- = zipWith (\ n b -> if b then Succ (Succ n) else n) ns bs- etad :: [Nat] -> [Bool] -> [Nat]- etad = zipWith (\ n b -> if b then Succ (Succ n) else n)- - data Either a b = Left a | Right b |]- ======>- data Either a b = Left a | Right b- map :: forall a b. (a -> b) -> [a] -> [b]- map _ GHC.Types.[] = []- map f (h GHC.Types.: t) = ((f h) GHC.Types.: (map f t))- liftMaybe :: forall a b. (a -> b) -> Maybe a -> Maybe b- liftMaybe f (Just x) = Just (f x)- liftMaybe _ Nothing = Nothing- zipWith :: forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]- zipWith f (x GHC.Types.: xs) (y GHC.Types.: ys)- = ((f x y) GHC.Types.: (zipWith f xs ys))- zipWith _ GHC.Types.[] GHC.Types.[] = []- zipWith _ (_ GHC.Types.: _) GHC.Types.[] = []- zipWith _ GHC.Types.[] (_ GHC.Types.: _) = []- foo :: forall a b. ((a -> b) -> a -> b) -> (a -> b) -> a -> b- foo f g a = f g a- splunge :: [Nat] -> [Bool] -> [Nat]- splunge ns bs- = zipWith (\ n b -> if b then Succ (Succ n) else n) ns bs- etad :: [Nat] -> [Bool] -> [Nat]- etad = zipWith (\ n b -> if b then Succ (Succ n) else n)- type LeftSym1 (t :: a0123456789) = Left t- instance SuppressUnusedWarnings LeftSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) LeftSym0KindInference GHC.Tuple.())- data LeftSym0 (l :: TyFun a0123456789 (Either a0123456789 b0123456789))- = forall arg. KindOf (Apply LeftSym0 arg) ~ KindOf (LeftSym1 arg) =>- LeftSym0KindInference- type instance Apply LeftSym0 l = LeftSym1 l- type RightSym1 (t :: b0123456789) = Right t- instance SuppressUnusedWarnings RightSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) RightSym0KindInference GHC.Tuple.())- data RightSym0 (l :: TyFun b0123456789 (Either a0123456789 b0123456789))- = forall arg. KindOf (Apply RightSym0 arg) ~ KindOf (RightSym1 arg) =>- RightSym0KindInference- type instance Apply RightSym0 l = RightSym1 l- type family Case_0123456789 ns bs n b t where- Case_0123456789 ns bs n b True = Apply SuccSym0 (Apply SuccSym0 n)- Case_0123456789 ns bs n b False = n- type family Lambda_0123456789 ns bs t t where- Lambda_0123456789 ns bs n b = Case_0123456789 ns bs n b b- type Lambda_0123456789Sym4 t t t t = Lambda_0123456789 t t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym3 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym3KindInference GHC.Tuple.())- data Lambda_0123456789Sym3 l l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym3 l l l) arg) ~ KindOf (Lambda_0123456789Sym4 l l l arg) =>- Lambda_0123456789Sym3KindInference- type instance Apply (Lambda_0123456789Sym3 l l l) l = Lambda_0123456789Sym4 l l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Case_0123456789 n b a_0123456789 a_0123456789 t where- Case_0123456789 n b a_0123456789 a_0123456789 True = Apply SuccSym0 (Apply SuccSym0 n)- Case_0123456789 n b a_0123456789 a_0123456789 False = n- type family Lambda_0123456789 a_0123456789 a_0123456789 t t where- Lambda_0123456789 a_0123456789 a_0123456789 n b = Case_0123456789 n b a_0123456789 a_0123456789 b- type Lambda_0123456789Sym4 t t t t = Lambda_0123456789 t t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym3 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym3KindInference GHC.Tuple.())- data Lambda_0123456789Sym3 l l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym3 l l l) arg) ~ KindOf (Lambda_0123456789Sym4 l l l arg) =>- Lambda_0123456789Sym3KindInference- type instance Apply (Lambda_0123456789Sym3 l l l) l = Lambda_0123456789Sym4 l l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type FooSym3 (t :: TyFun (TyFun a0123456789 b0123456789- -> GHC.Types.Type) (TyFun a0123456789 b0123456789- -> GHC.Types.Type)- -> GHC.Types.Type)- (t :: TyFun a0123456789 b0123456789 -> GHC.Types.Type)- (t :: a0123456789) =- Foo t t t- instance SuppressUnusedWarnings FooSym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym2KindInference GHC.Tuple.())- data FooSym2 (l :: TyFun (TyFun a0123456789 b0123456789- -> GHC.Types.Type) (TyFun a0123456789 b0123456789- -> GHC.Types.Type)- -> GHC.Types.Type)- (l :: TyFun a0123456789 b0123456789 -> GHC.Types.Type)- (l :: TyFun a0123456789 b0123456789)- = forall arg. KindOf (Apply (FooSym2 l l) arg) ~ KindOf (FooSym3 l l arg) =>- FooSym2KindInference- type instance Apply (FooSym2 l l) l = FooSym3 l l l- instance SuppressUnusedWarnings FooSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym1KindInference GHC.Tuple.())- data FooSym1 (l :: TyFun (TyFun a0123456789 b0123456789- -> GHC.Types.Type) (TyFun a0123456789 b0123456789- -> GHC.Types.Type)- -> GHC.Types.Type)- (l :: TyFun (TyFun a0123456789 b0123456789- -> GHC.Types.Type) (TyFun a0123456789 b0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply (FooSym1 l) arg) ~ KindOf (FooSym2 l arg) =>- FooSym1KindInference- type instance Apply (FooSym1 l) l = FooSym2 l l- instance SuppressUnusedWarnings FooSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym0KindInference GHC.Tuple.())- data FooSym0 (l :: TyFun (TyFun (TyFun a0123456789 b0123456789- -> GHC.Types.Type) (TyFun a0123456789 b0123456789- -> GHC.Types.Type)- -> GHC.Types.Type) (TyFun (TyFun a0123456789 b0123456789- -> GHC.Types.Type) (TyFun a0123456789 b0123456789- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply FooSym0 arg) ~ KindOf (FooSym1 arg) =>- FooSym0KindInference- type instance Apply FooSym0 l = FooSym1 l- type ZipWithSym3 (t :: TyFun a0123456789 (TyFun b0123456789 c0123456789- -> GHC.Types.Type)- -> GHC.Types.Type)- (t :: [a0123456789])- (t :: [b0123456789]) =- ZipWith t t t- instance SuppressUnusedWarnings ZipWithSym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ZipWithSym2KindInference GHC.Tuple.())- data ZipWithSym2 (l :: TyFun a0123456789 (TyFun b0123456789 c0123456789- -> GHC.Types.Type)- -> GHC.Types.Type)- (l :: [a0123456789])- (l :: TyFun [b0123456789] [c0123456789])- = forall arg. KindOf (Apply (ZipWithSym2 l l) arg) ~ KindOf (ZipWithSym3 l l arg) =>- ZipWithSym2KindInference- type instance Apply (ZipWithSym2 l l) l = ZipWithSym3 l l l- instance SuppressUnusedWarnings ZipWithSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ZipWithSym1KindInference GHC.Tuple.())- data ZipWithSym1 (l :: TyFun a0123456789 (TyFun b0123456789 c0123456789- -> GHC.Types.Type)- -> GHC.Types.Type)- (l :: TyFun [a0123456789] (TyFun [b0123456789] [c0123456789]- -> GHC.Types.Type))- = forall arg. KindOf (Apply (ZipWithSym1 l) arg) ~ KindOf (ZipWithSym2 l arg) =>- ZipWithSym1KindInference- type instance Apply (ZipWithSym1 l) l = ZipWithSym2 l l- instance SuppressUnusedWarnings ZipWithSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ZipWithSym0KindInference GHC.Tuple.())- data ZipWithSym0 (l :: TyFun (TyFun a0123456789 (TyFun b0123456789 c0123456789- -> GHC.Types.Type)- -> GHC.Types.Type) (TyFun [a0123456789] (TyFun [b0123456789] [c0123456789]- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply ZipWithSym0 arg) ~ KindOf (ZipWithSym1 arg) =>- ZipWithSym0KindInference- type instance Apply ZipWithSym0 l = ZipWithSym1 l- type SplungeSym2 (t :: [Nat]) (t :: [Bool]) = Splunge t t- instance SuppressUnusedWarnings SplungeSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) SplungeSym1KindInference GHC.Tuple.())- data SplungeSym1 (l :: [Nat]) (l :: TyFun [Bool] [Nat])- = forall arg. KindOf (Apply (SplungeSym1 l) arg) ~ KindOf (SplungeSym2 l arg) =>- SplungeSym1KindInference- type instance Apply (SplungeSym1 l) l = SplungeSym2 l l- instance SuppressUnusedWarnings SplungeSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) SplungeSym0KindInference GHC.Tuple.())- data SplungeSym0 (l :: TyFun [Nat] (TyFun [Bool] [Nat]- -> GHC.Types.Type))- = forall arg. KindOf (Apply SplungeSym0 arg) ~ KindOf (SplungeSym1 arg) =>- SplungeSym0KindInference- type instance Apply SplungeSym0 l = SplungeSym1 l- type EtadSym2 (t :: [Nat]) (t :: [Bool]) = Etad t t- instance SuppressUnusedWarnings EtadSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) EtadSym1KindInference GHC.Tuple.())- data EtadSym1 (l :: [Nat]) (l :: TyFun [Bool] [Nat])- = forall arg. KindOf (Apply (EtadSym1 l) arg) ~ KindOf (EtadSym2 l arg) =>- EtadSym1KindInference- type instance Apply (EtadSym1 l) l = EtadSym2 l l- instance SuppressUnusedWarnings EtadSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) EtadSym0KindInference GHC.Tuple.())- data EtadSym0 (l :: TyFun [Nat] (TyFun [Bool] [Nat]- -> GHC.Types.Type))- = forall arg. KindOf (Apply EtadSym0 arg) ~ KindOf (EtadSym1 arg) =>- EtadSym0KindInference- type instance Apply EtadSym0 l = EtadSym1 l- type LiftMaybeSym2 (t :: TyFun a0123456789 b0123456789- -> GHC.Types.Type)- (t :: Maybe a0123456789) =- LiftMaybe t t- instance SuppressUnusedWarnings LiftMaybeSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) LiftMaybeSym1KindInference GHC.Tuple.())- data LiftMaybeSym1 (l :: TyFun a0123456789 b0123456789- -> GHC.Types.Type)- (l :: TyFun (Maybe a0123456789) (Maybe b0123456789))- = forall arg. KindOf (Apply (LiftMaybeSym1 l) arg) ~ KindOf (LiftMaybeSym2 l arg) =>- LiftMaybeSym1KindInference- type instance Apply (LiftMaybeSym1 l) l = LiftMaybeSym2 l l- instance SuppressUnusedWarnings LiftMaybeSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) LiftMaybeSym0KindInference GHC.Tuple.())- data LiftMaybeSym0 (l :: TyFun (TyFun a0123456789 b0123456789- -> GHC.Types.Type) (TyFun (Maybe a0123456789) (Maybe b0123456789)- -> GHC.Types.Type))- = forall arg. KindOf (Apply LiftMaybeSym0 arg) ~ KindOf (LiftMaybeSym1 arg) =>- LiftMaybeSym0KindInference- type instance Apply LiftMaybeSym0 l = LiftMaybeSym1 l- type MapSym2 (t :: TyFun a0123456789 b0123456789 -> GHC.Types.Type)- (t :: [a0123456789]) =- Map t t- instance SuppressUnusedWarnings MapSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) MapSym1KindInference GHC.Tuple.())- data MapSym1 (l :: TyFun a0123456789 b0123456789 -> GHC.Types.Type)- (l :: TyFun [a0123456789] [b0123456789])- = forall arg. KindOf (Apply (MapSym1 l) arg) ~ KindOf (MapSym2 l arg) =>- MapSym1KindInference- type instance Apply (MapSym1 l) l = MapSym2 l l- instance SuppressUnusedWarnings MapSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) MapSym0KindInference GHC.Tuple.())- data MapSym0 (l :: TyFun (TyFun a0123456789 b0123456789- -> GHC.Types.Type) (TyFun [a0123456789] [b0123456789]- -> GHC.Types.Type))- = forall arg. KindOf (Apply MapSym0 arg) ~ KindOf (MapSym1 arg) =>- MapSym0KindInference- type instance Apply MapSym0 l = MapSym1 l- type family Foo (a :: TyFun (TyFun a b- -> GHC.Types.Type) (TyFun a b -> GHC.Types.Type)- -> GHC.Types.Type)- (a :: TyFun a b -> GHC.Types.Type)- (a :: a) :: b where- Foo f g a = Apply (Apply f g) a- type family ZipWith (a :: TyFun a (TyFun b c -> GHC.Types.Type)- -> GHC.Types.Type)- (a :: [a])- (a :: [b]) :: [c] where- ZipWith f ((:) x xs) ((:) y ys) = Apply (Apply (:$) (Apply (Apply f x) y)) (Apply (Apply (Apply ZipWithSym0 f) xs) ys)- ZipWith _z_0123456789 '[] '[] = '[]- ZipWith _z_0123456789 ((:) _z_0123456789 _z_0123456789) '[] = '[]- ZipWith _z_0123456789 '[] ((:) _z_0123456789 _z_0123456789) = '[]- type family Splunge (a :: [Nat]) (a :: [Bool]) :: [Nat] where- Splunge ns bs = Apply (Apply (Apply ZipWithSym0 (Apply (Apply Lambda_0123456789Sym0 ns) bs)) ns) bs- type family Etad (a :: [Nat]) (a :: [Bool]) :: [Nat] where- Etad a_0123456789 a_0123456789 = Apply (Apply (Apply ZipWithSym0 (Apply (Apply Lambda_0123456789Sym0 a_0123456789) a_0123456789)) a_0123456789) a_0123456789- type family LiftMaybe (a :: TyFun a b -> GHC.Types.Type)- (a :: Maybe a) :: Maybe b where- LiftMaybe f (Just x) = Apply JustSym0 (Apply f x)- LiftMaybe _z_0123456789 Nothing = NothingSym0- type family Map (a :: TyFun a b -> GHC.Types.Type)- (a :: [a]) :: [b] where- Map _z_0123456789 '[] = '[]- Map f ((:) h t) = Apply (Apply (:$) (Apply f h)) (Apply (Apply MapSym0 f) t)- sFoo ::- forall (t :: TyFun (TyFun a b -> GHC.Types.Type) (TyFun a b- -> GHC.Types.Type)- -> GHC.Types.Type)- (t :: TyFun a b -> GHC.Types.Type)- (t :: a).- Sing t- -> Sing t- -> Sing t -> Sing (Apply (Apply (Apply FooSym0 t) t) t :: b)- sZipWith ::- forall (t :: TyFun a (TyFun b c -> GHC.Types.Type)- -> GHC.Types.Type)- (t :: [a])- (t :: [b]).- Sing t- -> Sing t- -> Sing t -> Sing (Apply (Apply (Apply ZipWithSym0 t) t) t :: [c])- sSplunge ::- forall (t :: [Nat]) (t :: [Bool]).- Sing t -> Sing t -> Sing (Apply (Apply SplungeSym0 t) t :: [Nat])- sEtad ::- forall (t :: [Nat]) (t :: [Bool]).- Sing t -> Sing t -> Sing (Apply (Apply EtadSym0 t) t :: [Nat])- sLiftMaybe ::- forall (t :: TyFun a b -> GHC.Types.Type) (t :: Maybe a).- Sing t- -> Sing t -> Sing (Apply (Apply LiftMaybeSym0 t) t :: Maybe b)- sMap ::- forall (t :: TyFun a b -> GHC.Types.Type) (t :: [a]).- Sing t -> Sing t -> Sing (Apply (Apply MapSym0 t) t :: [b])- sFoo sF sG sA- = let- lambda ::- forall f g a.- (t ~ f, t ~ g, t ~ a) =>- Sing f- -> Sing g- -> Sing a -> Sing (Apply (Apply (Apply FooSym0 t) t) t :: b)- lambda f g a = applySing (applySing f g) a- in lambda sF sG sA- sZipWith sF (SCons sX sXs) (SCons sY sYs)- = let- lambda ::- forall f x xs y ys.- (t ~ f,- t ~ Apply (Apply (:$) x) xs,- t ~ Apply (Apply (:$) y) ys) =>- Sing f- -> Sing x- -> Sing xs- -> Sing y- -> Sing ys -> Sing (Apply (Apply (Apply ZipWithSym0 t) t) t :: [c])- lambda f x xs y ys- = applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (applySing f x) y))- (applySing- (applySing- (applySing (singFun3 (Proxy :: Proxy ZipWithSym0) sZipWith) f) xs)- ys)- in lambda sF sX sXs sY sYs- sZipWith _s_z_0123456789 SNil SNil- = let- lambda ::- forall _z_0123456789.- (t ~ _z_0123456789, t ~ '[], t ~ '[]) =>- Sing _z_0123456789- -> Sing (Apply (Apply (Apply ZipWithSym0 t) t) t :: [c])- lambda _z_0123456789 = SNil- in lambda _s_z_0123456789- sZipWith- _s_z_0123456789- (SCons _s_z_0123456789 _s_z_0123456789)- SNil- = let- lambda ::- forall _z_0123456789 _z_0123456789 _z_0123456789.- (t ~ _z_0123456789,- t ~ Apply (Apply (:$) _z_0123456789) _z_0123456789,- t ~ '[]) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply (Apply ZipWithSym0 t) t) t :: [c])- lambda _z_0123456789 _z_0123456789 _z_0123456789 = SNil- in lambda _s_z_0123456789 _s_z_0123456789 _s_z_0123456789- sZipWith- _s_z_0123456789- SNil- (SCons _s_z_0123456789 _s_z_0123456789)- = let- lambda ::- forall _z_0123456789 _z_0123456789 _z_0123456789.- (t ~ _z_0123456789,- t ~ '[],- t ~ Apply (Apply (:$) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply (Apply ZipWithSym0 t) t) t :: [c])- lambda _z_0123456789 _z_0123456789 _z_0123456789 = SNil- in lambda _s_z_0123456789 _s_z_0123456789 _s_z_0123456789- sSplunge sNs sBs- = let- lambda ::- forall ns bs.- (t ~ ns, t ~ bs) =>- Sing ns -> Sing bs -> Sing (Apply (Apply SplungeSym0 t) t :: [Nat])- lambda ns bs- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy ZipWithSym0) sZipWith)- (singFun2- (Proxy :: Proxy (Apply (Apply Lambda_0123456789Sym0 ns) bs))- (\ sN sB- -> let- lambda ::- forall n b.- Sing n- -> Sing b- -> Sing (Apply (Apply (Apply (Apply Lambda_0123456789Sym0 ns) bs) n) b)- lambda n b- = case b of {- STrue- -> let- lambda ::- TrueSym0 ~ b =>- Sing (Case_0123456789 ns bs n b TrueSym0)- lambda- = applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)- (applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc) n)- in lambda- SFalse- -> let- lambda ::- FalseSym0 ~ b =>- Sing (Case_0123456789 ns bs n b FalseSym0)- lambda = n- in lambda } ::- Sing (Case_0123456789 ns bs n b b)- in lambda sN sB)))- ns)- bs- in lambda sNs sBs- sEtad sA_0123456789 sA_0123456789- = let- lambda ::- forall a_0123456789 a_0123456789.- (t ~ a_0123456789, t ~ a_0123456789) =>- Sing a_0123456789- -> Sing a_0123456789 -> Sing (Apply (Apply EtadSym0 t) t :: [Nat])- lambda a_0123456789 a_0123456789- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy ZipWithSym0) sZipWith)- (singFun2- (Proxy ::- Proxy (Apply (Apply Lambda_0123456789Sym0 a_0123456789) a_0123456789))- (\ sN sB- -> let- lambda ::- forall n b.- Sing n- -> Sing b- -> Sing (Apply (Apply (Apply (Apply Lambda_0123456789Sym0 a_0123456789) a_0123456789) n) b)- lambda n b- = case b of {- STrue- -> let- lambda ::- TrueSym0 ~ b =>- Sing (Case_0123456789 n b a_0123456789 a_0123456789 TrueSym0)- lambda- = applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)- (applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc) n)- in lambda- SFalse- -> let- lambda ::- FalseSym0 ~ b =>- Sing (Case_0123456789 n b a_0123456789 a_0123456789 FalseSym0)- lambda = n- in lambda } ::- Sing (Case_0123456789 n b a_0123456789 a_0123456789 b)- in lambda sN sB)))- a_0123456789)- a_0123456789- in lambda sA_0123456789 sA_0123456789- sLiftMaybe sF (SJust sX)- = let- lambda ::- forall f x.- (t ~ f, t ~ Apply JustSym0 x) =>- Sing f- -> Sing x -> Sing (Apply (Apply LiftMaybeSym0 t) t :: Maybe b)- lambda f x- = applySing- (singFun1 (Proxy :: Proxy JustSym0) SJust) (applySing f x)- in lambda sF sX- sLiftMaybe _s_z_0123456789 SNothing- = let- lambda ::- forall _z_0123456789.- (t ~ _z_0123456789, t ~ NothingSym0) =>- Sing _z_0123456789- -> Sing (Apply (Apply LiftMaybeSym0 t) t :: Maybe b)- lambda _z_0123456789 = SNothing- in lambda _s_z_0123456789- sMap _s_z_0123456789 SNil- = let- lambda ::- forall _z_0123456789.- (t ~ _z_0123456789, t ~ '[]) =>- Sing _z_0123456789 -> Sing (Apply (Apply MapSym0 t) t :: [b])- lambda _z_0123456789 = SNil- in lambda _s_z_0123456789- sMap sF (SCons sH sT)- = let- lambda ::- forall f h t.- (t ~ f, t ~ Apply (Apply (:$) h) t) =>- Sing f- -> Sing h -> Sing t -> Sing (Apply (Apply MapSym0 t) t :: [b])- lambda f h t- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) (applySing f h))- (applySing- (applySing (singFun2 (Proxy :: Proxy MapSym0) sMap) f) t)- in lambda sF sH sT- data instance Sing (z :: Either a b)- = forall (n :: a). z ~ Left n => SLeft (Sing (n :: a)) |- forall (n :: b). z ~ Right n => SRight (Sing (n :: b))- type SEither = (Sing :: Either a b -> GHC.Types.Type)- instance (SingKind a, SingKind b) => SingKind (Either a b) where- type DemoteRep (Either a b) = Either (DemoteRep a) (DemoteRep b)- fromSing (SLeft b) = Left (fromSing b)- fromSing (SRight b) = Right (fromSing b)- toSing (Left b)- = case toSing b :: SomeSing a of {- SomeSing c -> SomeSing (SLeft c) }- toSing (Right b)- = case toSing b :: SomeSing b of {- SomeSing c -> SomeSing (SRight c) }- instance SingI n => SingI (Left (n :: a)) where- sing = SLeft sing- instance SingI n => SingI (Right (n :: b)) where- sing = SRight sing
+ tests/compile-and-dump/Singletons/HigherOrder.ghc82.template view
@@ -0,0 +1,423 @@+Singletons/HigherOrder.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| map :: (a -> b) -> [a] -> [b]+ map _ [] = []+ map f (h : t) = (f h) : (map f t)+ liftMaybe :: (a -> b) -> Maybe a -> Maybe b+ liftMaybe f (Just x) = Just (f x)+ liftMaybe _ Nothing = Nothing+ zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]+ zipWith f (x : xs) (y : ys) = f x y : zipWith f xs ys+ zipWith _ [] [] = []+ zipWith _ (_ : _) [] = []+ zipWith _ [] (_ : _) = []+ foo :: ((a -> b) -> a -> b) -> (a -> b) -> a -> b+ foo f g a = f g a+ splunge :: [Nat] -> [Bool] -> [Nat]+ splunge ns bs+ = zipWith (\ n b -> if b then Succ (Succ n) else n) ns bs+ etad :: [Nat] -> [Bool] -> [Nat]+ etad = zipWith (\ n b -> if b then Succ (Succ n) else n)+ + data Either a b = Left a | Right b |]+ ======>+ data Either a b = Left a | Right b+ map :: (a -> b) -> [a] -> [b]+ map _ GHC.Types.[] = []+ map f (h GHC.Types.: t) = ((f h) GHC.Types.: ((map f) t))+ liftMaybe :: (a -> b) -> Maybe a -> Maybe b+ liftMaybe f (Just x) = Just (f x)+ liftMaybe _ Nothing = Nothing+ zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]+ zipWith f (x GHC.Types.: xs) (y GHC.Types.: ys)+ = (((f x) y) GHC.Types.: (((zipWith f) xs) ys))+ zipWith _ GHC.Types.[] GHC.Types.[] = []+ zipWith _ (_ GHC.Types.: _) GHC.Types.[] = []+ zipWith _ GHC.Types.[] (_ GHC.Types.: _) = []+ foo :: ((a -> b) -> a -> b) -> (a -> b) -> a -> b+ foo f g a = (f g) a+ splunge :: [Nat] -> [Bool] -> [Nat]+ splunge ns bs+ = ((zipWith (\ n b -> if b then Succ (Succ n) else n)) ns) bs+ etad :: [Nat] -> [Bool] -> [Nat]+ etad = zipWith (\ n b -> if b then Succ (Succ n) else n)+ type LeftSym1 (t :: a0123456789876543210) = Left t+ instance SuppressUnusedWarnings LeftSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) LeftSym0KindInference) GHC.Tuple.())+ data LeftSym0 (l :: TyFun a0123456789876543210 (Either a0123456789876543210 b0123456789876543210))+ = forall arg. SameKind (Apply LeftSym0 arg) (LeftSym1 arg) =>+ LeftSym0KindInference+ type instance Apply LeftSym0 l = Left l+ type RightSym1 (t :: b0123456789876543210) = Right t+ instance SuppressUnusedWarnings RightSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) RightSym0KindInference) GHC.Tuple.())+ data RightSym0 (l :: TyFun b0123456789876543210 (Either a0123456789876543210 b0123456789876543210))+ = forall arg. SameKind (Apply RightSym0 arg) (RightSym1 arg) =>+ RightSym0KindInference+ type instance Apply RightSym0 l = Right l+ type family Case_0123456789876543210 ns bs n b t where+ Case_0123456789876543210 ns bs n b True = Apply SuccSym0 (Apply SuccSym0 n)+ Case_0123456789876543210 ns bs n b False = n+ type family Lambda_0123456789876543210 ns bs t t where+ Lambda_0123456789876543210 ns bs n b = Case_0123456789876543210 ns bs n b b+ type Lambda_0123456789876543210Sym4 t t t t =+ Lambda_0123456789876543210 t t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym3 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym3KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym3 l l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym3 l l l) arg) (Lambda_0123456789876543210Sym4 l l l arg) =>+ Lambda_0123456789876543210Sym3KindInference+ type instance Apply (Lambda_0123456789876543210Sym3 l l l) l = Lambda_0123456789876543210 l l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210Sym3 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 t where+ Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 True = Apply SuccSym0 (Apply SuccSym0 n)+ Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 False = n+ type family Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where+ Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n b = Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 b+ type Lambda_0123456789876543210Sym4 t t t t =+ Lambda_0123456789876543210 t t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym3 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym3KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym3 l l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym3 l l l) arg) (Lambda_0123456789876543210Sym4 l l l arg) =>+ Lambda_0123456789876543210Sym3KindInference+ type instance Apply (Lambda_0123456789876543210Sym3 l l l) l = Lambda_0123456789876543210 l l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210Sym3 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type FooSym3 (t :: TyFun (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type)+ -> GHC.Types.Type) (t :: TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (t :: a0123456789876543210) =+ Foo t t t+ instance SuppressUnusedWarnings FooSym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym2KindInference) GHC.Tuple.())+ data FooSym2 (l :: TyFun (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type)+ -> GHC.Types.Type) (l :: TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (l :: TyFun a0123456789876543210 b0123456789876543210)+ = forall arg. SameKind (Apply (FooSym2 l l) arg) (FooSym3 l l arg) =>+ FooSym2KindInference+ type instance Apply (FooSym2 l l) l = Foo l l l+ instance SuppressUnusedWarnings FooSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym1KindInference) GHC.Tuple.())+ data FooSym1 (l :: TyFun (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type)+ -> GHC.Types.Type) (l :: TyFun (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (FooSym1 l) arg) (FooSym2 l arg) =>+ FooSym1KindInference+ type instance Apply (FooSym1 l) l = FooSym2 l l+ instance SuppressUnusedWarnings FooSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym0KindInference) GHC.Tuple.())+ data FooSym0 (l :: TyFun (TyFun (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type)+ -> GHC.Types.Type) (TyFun (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>+ FooSym0KindInference+ type instance Apply FooSym0 l = FooSym1 l+ type ZipWithSym3 (t :: TyFun a0123456789876543210 (TyFun b0123456789876543210 c0123456789876543210+ -> GHC.Types.Type)+ -> GHC.Types.Type) (t :: [a0123456789876543210]) (t :: [b0123456789876543210]) =+ ZipWith t t t+ instance SuppressUnusedWarnings ZipWithSym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ZipWithSym2KindInference) GHC.Tuple.())+ data ZipWithSym2 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 c0123456789876543210+ -> GHC.Types.Type)+ -> GHC.Types.Type) (l :: [a0123456789876543210]) (l :: TyFun [b0123456789876543210] [c0123456789876543210])+ = forall arg. SameKind (Apply (ZipWithSym2 l l) arg) (ZipWithSym3 l l arg) =>+ ZipWithSym2KindInference+ type instance Apply (ZipWithSym2 l l) l = ZipWith l l l+ instance SuppressUnusedWarnings ZipWithSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ZipWithSym1KindInference) GHC.Tuple.())+ data ZipWithSym1 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 c0123456789876543210+ -> GHC.Types.Type)+ -> GHC.Types.Type) (l :: TyFun [a0123456789876543210] (TyFun [b0123456789876543210] [c0123456789876543210]+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (ZipWithSym1 l) arg) (ZipWithSym2 l arg) =>+ ZipWithSym1KindInference+ type instance Apply (ZipWithSym1 l) l = ZipWithSym2 l l+ instance SuppressUnusedWarnings ZipWithSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ZipWithSym0KindInference) GHC.Tuple.())+ data ZipWithSym0 (l :: TyFun (TyFun a0123456789876543210 (TyFun b0123456789876543210 c0123456789876543210+ -> GHC.Types.Type)+ -> GHC.Types.Type) (TyFun [a0123456789876543210] (TyFun [b0123456789876543210] [c0123456789876543210]+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply ZipWithSym0 arg) (ZipWithSym1 arg) =>+ ZipWithSym0KindInference+ type instance Apply ZipWithSym0 l = ZipWithSym1 l+ type SplungeSym2 (t :: [Nat]) (t :: [Bool]) = Splunge t t+ instance SuppressUnusedWarnings SplungeSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) SplungeSym1KindInference) GHC.Tuple.())+ data SplungeSym1 (l :: [Nat]) (l :: TyFun [Bool] [Nat])+ = forall arg. SameKind (Apply (SplungeSym1 l) arg) (SplungeSym2 l arg) =>+ SplungeSym1KindInference+ type instance Apply (SplungeSym1 l) l = Splunge l l+ instance SuppressUnusedWarnings SplungeSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) SplungeSym0KindInference) GHC.Tuple.())+ data SplungeSym0 (l :: TyFun [Nat] (TyFun [Bool] [Nat]+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply SplungeSym0 arg) (SplungeSym1 arg) =>+ SplungeSym0KindInference+ type instance Apply SplungeSym0 l = SplungeSym1 l+ type EtadSym2 (t :: [Nat]) (t :: [Bool]) = Etad t t+ instance SuppressUnusedWarnings EtadSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) EtadSym1KindInference) GHC.Tuple.())+ data EtadSym1 (l :: [Nat]) (l :: TyFun [Bool] [Nat])+ = forall arg. SameKind (Apply (EtadSym1 l) arg) (EtadSym2 l arg) =>+ EtadSym1KindInference+ type instance Apply (EtadSym1 l) l = Etad l l+ instance SuppressUnusedWarnings EtadSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) EtadSym0KindInference) GHC.Tuple.())+ data EtadSym0 (l :: TyFun [Nat] (TyFun [Bool] [Nat]+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply EtadSym0 arg) (EtadSym1 arg) =>+ EtadSym0KindInference+ type instance Apply EtadSym0 l = EtadSym1 l+ type LiftMaybeSym2 (t :: TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (t :: Maybe a0123456789876543210) =+ LiftMaybe t t+ instance SuppressUnusedWarnings LiftMaybeSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) LiftMaybeSym1KindInference) GHC.Tuple.())+ data LiftMaybeSym1 (l :: TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (l :: TyFun (Maybe a0123456789876543210) (Maybe b0123456789876543210))+ = forall arg. SameKind (Apply (LiftMaybeSym1 l) arg) (LiftMaybeSym2 l arg) =>+ LiftMaybeSym1KindInference+ type instance Apply (LiftMaybeSym1 l) l = LiftMaybe l l+ instance SuppressUnusedWarnings LiftMaybeSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) LiftMaybeSym0KindInference) GHC.Tuple.())+ data LiftMaybeSym0 (l :: TyFun (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (TyFun (Maybe a0123456789876543210) (Maybe b0123456789876543210)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply LiftMaybeSym0 arg) (LiftMaybeSym1 arg) =>+ LiftMaybeSym0KindInference+ type instance Apply LiftMaybeSym0 l = LiftMaybeSym1 l+ type MapSym2 (t :: TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (t :: [a0123456789876543210]) =+ Map t t+ instance SuppressUnusedWarnings MapSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) MapSym1KindInference) GHC.Tuple.())+ data MapSym1 (l :: TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (l :: TyFun [a0123456789876543210] [b0123456789876543210])+ = forall arg. SameKind (Apply (MapSym1 l) arg) (MapSym2 l arg) =>+ MapSym1KindInference+ type instance Apply (MapSym1 l) l = Map l l+ instance SuppressUnusedWarnings MapSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) MapSym0KindInference) GHC.Tuple.())+ data MapSym0 (l :: TyFun (TyFun a0123456789876543210 b0123456789876543210+ -> GHC.Types.Type) (TyFun [a0123456789876543210] [b0123456789876543210]+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply MapSym0 arg) (MapSym1 arg) =>+ MapSym0KindInference+ type instance Apply MapSym0 l = MapSym1 l+ type family Foo (a :: TyFun (TyFun a b+ -> GHC.Types.Type) (TyFun a b -> GHC.Types.Type)+ -> GHC.Types.Type) (a :: TyFun a b+ -> GHC.Types.Type) (a :: a) :: b where+ Foo f g a = Apply (Apply f g) a+ type family ZipWith (a :: TyFun a (TyFun b c -> GHC.Types.Type)+ -> GHC.Types.Type) (a :: [a]) (a :: [b]) :: [c] where+ ZipWith f ((:) x xs) ((:) y ys) = Apply (Apply (:$) (Apply (Apply f x) y)) (Apply (Apply (Apply ZipWithSym0 f) xs) ys)+ ZipWith _z_0123456789876543210 '[] '[] = '[]+ ZipWith _z_0123456789876543210 ((:) _z_0123456789876543210 _z_0123456789876543210) '[] = '[]+ ZipWith _z_0123456789876543210 '[] ((:) _z_0123456789876543210 _z_0123456789876543210) = '[]+ type family Splunge (a :: [Nat]) (a :: [Bool]) :: [Nat] where+ Splunge ns bs = Apply (Apply (Apply ZipWithSym0 (Apply (Apply Lambda_0123456789876543210Sym0 ns) bs)) ns) bs+ type family Etad (a :: [Nat]) (a :: [Bool]) :: [Nat] where+ Etad a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Apply ZipWithSym0 (Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210)) a_0123456789876543210) a_0123456789876543210+ type family LiftMaybe (a :: TyFun a b+ -> GHC.Types.Type) (a :: Maybe a) :: Maybe b where+ LiftMaybe f (Just x) = Apply JustSym0 (Apply f x)+ LiftMaybe _z_0123456789876543210 Nothing = NothingSym0+ type family Map (a :: TyFun a b+ -> GHC.Types.Type) (a :: [a]) :: [b] where+ Map _z_0123456789876543210 '[] = '[]+ Map f ((:) h t) = Apply (Apply (:$) (Apply f h)) (Apply (Apply MapSym0 f) t)+ sFoo ::+ forall (t :: TyFun (TyFun a b -> GHC.Types.Type) (TyFun a b+ -> GHC.Types.Type)+ -> GHC.Types.Type)+ (t :: TyFun a b -> GHC.Types.Type)+ (t :: a).+ Sing t+ -> Sing t+ -> Sing t -> Sing (Apply (Apply (Apply FooSym0 t) t) t :: b)+ sZipWith ::+ forall (t :: TyFun a (TyFun b c -> GHC.Types.Type)+ -> GHC.Types.Type)+ (t :: [a])+ (t :: [b]).+ Sing t+ -> Sing t+ -> Sing t -> Sing (Apply (Apply (Apply ZipWithSym0 t) t) t :: [c])+ sSplunge ::+ forall (t :: [Nat]) (t :: [Bool]).+ Sing t -> Sing t -> Sing (Apply (Apply SplungeSym0 t) t :: [Nat])+ sEtad ::+ forall (t :: [Nat]) (t :: [Bool]).+ Sing t -> Sing t -> Sing (Apply (Apply EtadSym0 t) t :: [Nat])+ sLiftMaybe ::+ forall (t :: TyFun a b -> GHC.Types.Type) (t :: Maybe a).+ Sing t+ -> Sing t -> Sing (Apply (Apply LiftMaybeSym0 t) t :: Maybe b)+ sMap ::+ forall (t :: TyFun a b -> GHC.Types.Type) (t :: [a]).+ Sing t -> Sing t -> Sing (Apply (Apply MapSym0 t) t :: [b])+ sFoo (sF :: Sing f) (sG :: Sing g) (sA :: Sing a)+ = (applySing ((applySing sF) sG)) sA+ sZipWith+ (sF :: Sing f)+ (SCons (sX :: Sing x) (sXs :: Sing xs))+ (SCons (sY :: Sing y) (sYs :: Sing ys))+ = (applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((applySing sF) sX)) sY)))+ ((applySing+ ((applySing ((applySing ((singFun3 @ZipWithSym0) sZipWith)) sF))+ sXs))+ sYs)+ sZipWith _ SNil SNil = SNil+ sZipWith _ (SCons _ _) SNil = SNil+ sZipWith _ SNil (SCons _ _) = SNil+ sSplunge (sNs :: Sing ns) (sBs :: Sing bs)+ = (applySing+ ((applySing+ ((applySing ((singFun3 @ZipWithSym0) sZipWith))+ ((singFun2 @(Apply (Apply Lambda_0123456789876543210Sym0 ns) bs))+ (\ sN sB+ -> case (GHC.Tuple.(,) sN) sB of {+ GHC.Tuple.(,) (_ :: Sing n) (_ :: Sing b)+ -> case sB of+ STrue+ -> (applySing ((singFun1 @SuccSym0) SSucc))+ ((applySing ((singFun1 @SuccSym0) SSucc)) sN)+ SFalse -> sN ::+ Sing (Case_0123456789876543210 ns bs n b b) }))))+ sNs))+ sBs+ sEtad+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ ((applySing+ ((applySing ((singFun3 @ZipWithSym0) sZipWith))+ ((singFun2+ @(Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210))+ (\ sN sB+ -> case (GHC.Tuple.(,) sN) sB of {+ GHC.Tuple.(,) (_ :: Sing n) (_ :: Sing b)+ -> case sB of+ STrue+ -> (applySing ((singFun1 @SuccSym0) SSucc))+ ((applySing ((singFun1 @SuccSym0) SSucc)) sN)+ SFalse -> sN ::+ Sing (Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 b) }))))+ sA_0123456789876543210))+ sA_0123456789876543210+ sLiftMaybe (sF :: Sing f) (SJust (sX :: Sing x))+ = (applySing ((singFun1 @JustSym0) SJust)) ((applySing sF) sX)+ sLiftMaybe _ SNothing = SNothing+ sMap _ SNil = SNil+ sMap (sF :: Sing f) (SCons (sH :: Sing h) (sT :: Sing t))+ = (applySing+ ((applySing ((singFun2 @(:$)) SCons)) ((applySing sF) sH)))+ ((applySing ((applySing ((singFun2 @MapSym0) sMap)) sF)) sT)+ data instance Sing (z :: Either a b)+ = forall (n :: a). z ~ Left n => SLeft (Sing (n :: a)) |+ forall (n :: b). z ~ Right n => SRight (Sing (n :: b))+ type SEither = (Sing :: Either a b -> GHC.Types.Type)+ instance (SingKind a, SingKind b) => SingKind (Either a b) where+ type Demote (Either a b) = Either (Demote a) (Demote b)+ fromSing (SLeft b) = Left (fromSing b)+ fromSing (SRight b) = Right (fromSing b)+ toSing (Left b)+ = case toSing b :: SomeSing a of {+ SomeSing c -> SomeSing (SLeft c) }+ toSing (Right b)+ = case toSing b :: SomeSing b of {+ SomeSing c -> SomeSing (SRight c) }+ instance SingI n => SingI (Left (n :: a)) where+ sing = SLeft sing+ instance SingI n => SingI (Right (n :: b)) where+ sing = SRight sing
− tests/compile-and-dump/Singletons/LambdaCase.ghc80.template
@@ -1,299 +0,0 @@-Singletons/LambdaCase.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| foo1 :: a -> Maybe a -> a- foo1 d x- = (\case {- Just y -> y- Nothing -> d })- x- foo2 :: a -> Maybe a -> a- foo2 d _- = (\case {- Just y -> y- Nothing -> d })- (Just d)- foo3 :: a -> b -> a- foo3 a b = (\case { (p, _) -> p }) (a, b) |]- ======>- foo1 :: forall a. a -> Maybe a -> a- foo1 d x- = \case {- Just y -> y- Nothing -> d }- x- foo2 :: forall a. a -> Maybe a -> a- foo2 d _- = \case {- Just y -> y- Nothing -> d }- (Just d)- foo3 :: forall a b. a -> b -> a- foo3 a b = \case { (p, _) -> p } (a, b)- type family Case_0123456789 a b x_0123456789 t where- Case_0123456789 a b x_0123456789 '(p, _z_0123456789) = p- type family Lambda_0123456789 a b t where- Lambda_0123456789 a b x_0123456789 = Case_0123456789 a b x_0123456789 x_0123456789- type Lambda_0123456789Sym3 t t t = Lambda_0123456789 t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Case_0123456789 d x_0123456789 _z_0123456789 t where- Case_0123456789 d x_0123456789 _z_0123456789 (Just y) = y- Case_0123456789 d x_0123456789 _z_0123456789 Nothing = d- type family Lambda_0123456789 d _z_0123456789 t where- Lambda_0123456789 d _z_0123456789 x_0123456789 = Case_0123456789 d x_0123456789 _z_0123456789 x_0123456789- type Lambda_0123456789Sym3 t t t = Lambda_0123456789 t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Case_0123456789 d x x_0123456789 t where- Case_0123456789 d x x_0123456789 (Just y) = y- Case_0123456789 d x x_0123456789 Nothing = d- type family Lambda_0123456789 d x t where- Lambda_0123456789 d x x_0123456789 = Case_0123456789 d x x_0123456789 x_0123456789- type Lambda_0123456789Sym3 t t t = Lambda_0123456789 t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type Foo3Sym2 (t :: a0123456789) (t :: b0123456789) = Foo3 t t- instance SuppressUnusedWarnings Foo3Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo3Sym1KindInference GHC.Tuple.())- data Foo3Sym1 (l :: a0123456789)- (l :: TyFun b0123456789 a0123456789)- = forall arg. KindOf (Apply (Foo3Sym1 l) arg) ~ KindOf (Foo3Sym2 l arg) =>- Foo3Sym1KindInference- type instance Apply (Foo3Sym1 l) l = Foo3Sym2 l l- instance SuppressUnusedWarnings Foo3Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo3Sym0KindInference GHC.Tuple.())- data Foo3Sym0 (l :: TyFun a0123456789 (TyFun b0123456789 a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo3Sym0 arg) ~ KindOf (Foo3Sym1 arg) =>- Foo3Sym0KindInference- type instance Apply Foo3Sym0 l = Foo3Sym1 l- type Foo2Sym2 (t :: a0123456789) (t :: Maybe a0123456789) =- Foo2 t t- instance SuppressUnusedWarnings Foo2Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo2Sym1KindInference GHC.Tuple.())- data Foo2Sym1 (l :: a0123456789)- (l :: TyFun (Maybe a0123456789) a0123456789)- = forall arg. KindOf (Apply (Foo2Sym1 l) arg) ~ KindOf (Foo2Sym2 l arg) =>- Foo2Sym1KindInference- type instance Apply (Foo2Sym1 l) l = Foo2Sym2 l l- instance SuppressUnusedWarnings Foo2Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo2Sym0KindInference GHC.Tuple.())- data Foo2Sym0 (l :: TyFun a0123456789 (TyFun (Maybe a0123456789) a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo2Sym0 arg) ~ KindOf (Foo2Sym1 arg) =>- Foo2Sym0KindInference- type instance Apply Foo2Sym0 l = Foo2Sym1 l- type Foo1Sym2 (t :: a0123456789) (t :: Maybe a0123456789) =- Foo1 t t- instance SuppressUnusedWarnings Foo1Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo1Sym1KindInference GHC.Tuple.())- data Foo1Sym1 (l :: a0123456789)- (l :: TyFun (Maybe a0123456789) a0123456789)- = forall arg. KindOf (Apply (Foo1Sym1 l) arg) ~ KindOf (Foo1Sym2 l arg) =>- Foo1Sym1KindInference- type instance Apply (Foo1Sym1 l) l = Foo1Sym2 l l- instance SuppressUnusedWarnings Foo1Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo1Sym0KindInference GHC.Tuple.())- data Foo1Sym0 (l :: TyFun a0123456789 (TyFun (Maybe a0123456789) a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo1Sym0 arg) ~ KindOf (Foo1Sym1 arg) =>- Foo1Sym0KindInference- type instance Apply Foo1Sym0 l = Foo1Sym1 l- type family Foo3 (a :: a) (a :: b) :: a where- Foo3 a b = Apply (Apply (Apply Lambda_0123456789Sym0 a) b) (Apply (Apply Tuple2Sym0 a) b)- type family Foo2 (a :: a) (a :: Maybe a) :: a where- Foo2 d _z_0123456789 = Apply (Apply (Apply Lambda_0123456789Sym0 d) _z_0123456789) (Apply JustSym0 d)- type family Foo1 (a :: a) (a :: Maybe a) :: a where- Foo1 d x = Apply (Apply (Apply Lambda_0123456789Sym0 d) x) x- sFoo3 ::- forall (t :: a) (t :: b).- Sing t -> Sing t -> Sing (Apply (Apply Foo3Sym0 t) t :: a)- sFoo2 ::- forall (t :: a) (t :: Maybe a).- Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)- sFoo1 ::- forall (t :: a) (t :: Maybe a).- Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)- sFoo3 sA sB- = let- lambda ::- forall a b.- (t ~ a, t ~ b) =>- Sing a -> Sing b -> Sing (Apply (Apply Foo3Sym0 t) t :: a)- lambda a b- = applySing- (singFun1- (Proxy :: Proxy (Apply (Apply Lambda_0123456789Sym0 a) b))- (\ sX_0123456789- -> let- lambda ::- forall x_0123456789.- Sing x_0123456789- -> Sing (Apply (Apply (Apply Lambda_0123456789Sym0 a) b) x_0123456789)- lambda x_0123456789- = case x_0123456789 of {- STuple2 sP _s_z_0123456789- -> let- lambda ::- forall p _z_0123456789.- Apply (Apply Tuple2Sym0 p) _z_0123456789 ~ x_0123456789 =>- Sing p- -> Sing _z_0123456789- -> Sing (Case_0123456789 a b x_0123456789 (Apply (Apply Tuple2Sym0 p) _z_0123456789))- lambda p _z_0123456789 = p- in lambda sP _s_z_0123456789 } ::- Sing (Case_0123456789 a b x_0123456789 x_0123456789)- in lambda sX_0123456789))- (applySing- (applySing (singFun2 (Proxy :: Proxy Tuple2Sym0) STuple2) a) b)- in lambda sA sB- sFoo2 sD _s_z_0123456789- = let- lambda ::- forall d _z_0123456789.- (t ~ d, t ~ _z_0123456789) =>- Sing d- -> Sing _z_0123456789 -> Sing (Apply (Apply Foo2Sym0 t) t :: a)- lambda d _z_0123456789- = applySing- (singFun1- (Proxy ::- Proxy (Apply (Apply Lambda_0123456789Sym0 d) _z_0123456789))- (\ sX_0123456789- -> let- lambda ::- forall x_0123456789.- Sing x_0123456789- -> Sing (Apply (Apply (Apply Lambda_0123456789Sym0 d) _z_0123456789) x_0123456789)- lambda x_0123456789- = case x_0123456789 of {- SJust sY- -> let- lambda ::- forall y.- Apply JustSym0 y ~ x_0123456789 =>- Sing y- -> Sing (Case_0123456789 d x_0123456789 _z_0123456789 (Apply JustSym0 y))- lambda y = y- in lambda sY- SNothing- -> let- lambda ::- NothingSym0 ~ x_0123456789 =>- Sing (Case_0123456789 d x_0123456789 _z_0123456789 NothingSym0)- lambda = d- in lambda } ::- Sing (Case_0123456789 d x_0123456789 _z_0123456789 x_0123456789)- in lambda sX_0123456789))- (applySing (singFun1 (Proxy :: Proxy JustSym0) SJust) d)- in lambda sD _s_z_0123456789- sFoo1 sD sX- = let- lambda ::- forall d x.- (t ~ d, t ~ x) =>- Sing d -> Sing x -> Sing (Apply (Apply Foo1Sym0 t) t :: a)- lambda d x- = applySing- (singFun1- (Proxy :: Proxy (Apply (Apply Lambda_0123456789Sym0 d) x))- (\ sX_0123456789- -> let- lambda ::- forall x_0123456789.- Sing x_0123456789- -> Sing (Apply (Apply (Apply Lambda_0123456789Sym0 d) x) x_0123456789)- lambda x_0123456789- = case x_0123456789 of {- SJust sY- -> let- lambda ::- forall y.- Apply JustSym0 y ~ x_0123456789 =>- Sing y- -> Sing (Case_0123456789 d x x_0123456789 (Apply JustSym0 y))- lambda y = y- in lambda sY- SNothing- -> let- lambda ::- NothingSym0 ~ x_0123456789 =>- Sing (Case_0123456789 d x x_0123456789 NothingSym0)- lambda = d- in lambda } ::- Sing (Case_0123456789 d x x_0123456789 x_0123456789)- in lambda sX_0123456789))- x- in lambda sD sX
+ tests/compile-and-dump/Singletons/LambdaCase.ghc82.template view
@@ -0,0 +1,222 @@+Singletons/LambdaCase.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| foo1 :: a -> Maybe a -> a+ foo1 d x+ = (\case+ Just y -> y+ Nothing -> d)+ x+ foo2 :: a -> Maybe a -> a+ foo2 d _+ = (\case+ Just y -> y+ Nothing -> d)+ (Just d)+ foo3 :: a -> b -> a+ foo3 a b = (\case (p, _) -> p) (a, b) |]+ ======>+ foo1 :: a -> Maybe a -> a+ foo1 d x+ = (\case+ \ (Just y) -> y+ \ Nothing -> d)+ x+ foo2 :: a -> Maybe a -> a+ foo2 d _+ = (\case+ \ (Just y) -> y+ \ Nothing -> d)+ (Just d)+ foo3 :: a -> b -> a+ foo3 a b = (\case \ (p, _) -> p) (a, b)+ type family Case_0123456789876543210 a b x_0123456789876543210 t where+ Case_0123456789876543210 a b x_0123456789876543210 '(p,+ _z_0123456789876543210) = p+ type family Lambda_0123456789876543210 a b t where+ Lambda_0123456789876543210 a b x_0123456789876543210 = Case_0123456789876543210 a b x_0123456789876543210 x_0123456789876543210+ type Lambda_0123456789876543210Sym3 t t t =+ Lambda_0123456789876543210 t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Case_0123456789876543210 d x_0123456789876543210 t where+ Case_0123456789876543210 d x_0123456789876543210 (Just y) = y+ Case_0123456789876543210 d x_0123456789876543210 Nothing = d+ type family Lambda_0123456789876543210 d t where+ Lambda_0123456789876543210 d x_0123456789876543210 = Case_0123456789876543210 d x_0123456789876543210 x_0123456789876543210+ type Lambda_0123456789876543210Sym2 t t =+ Lambda_0123456789876543210 t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Case_0123456789876543210 d x x_0123456789876543210 t where+ Case_0123456789876543210 d x x_0123456789876543210 (Just y) = y+ Case_0123456789876543210 d x x_0123456789876543210 Nothing = d+ type family Lambda_0123456789876543210 d x t where+ Lambda_0123456789876543210 d x x_0123456789876543210 = Case_0123456789876543210 d x x_0123456789876543210 x_0123456789876543210+ type Lambda_0123456789876543210Sym3 t t t =+ Lambda_0123456789876543210 t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type Foo3Sym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Foo3 t t+ instance SuppressUnusedWarnings Foo3Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo3Sym1KindInference) GHC.Tuple.())+ data Foo3Sym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply (Foo3Sym1 l) arg) (Foo3Sym2 l arg) =>+ Foo3Sym1KindInference+ type instance Apply (Foo3Sym1 l) l = Foo3 l l+ instance SuppressUnusedWarnings Foo3Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo3Sym0KindInference) GHC.Tuple.())+ data Foo3Sym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>+ Foo3Sym0KindInference+ type instance Apply Foo3Sym0 l = Foo3Sym1 l+ type Foo2Sym2 (t :: a0123456789876543210) (t :: Maybe a0123456789876543210) =+ Foo2 t t+ instance SuppressUnusedWarnings Foo2Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo2Sym1KindInference) GHC.Tuple.())+ data Foo2Sym1 (l :: a0123456789876543210) (l :: TyFun (Maybe a0123456789876543210) a0123456789876543210)+ = forall arg. SameKind (Apply (Foo2Sym1 l) arg) (Foo2Sym2 l arg) =>+ Foo2Sym1KindInference+ type instance Apply (Foo2Sym1 l) l = Foo2 l l+ instance SuppressUnusedWarnings Foo2Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo2Sym0KindInference) GHC.Tuple.())+ data Foo2Sym0 (l :: TyFun a0123456789876543210 (TyFun (Maybe a0123456789876543210) a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>+ Foo2Sym0KindInference+ type instance Apply Foo2Sym0 l = Foo2Sym1 l+ type Foo1Sym2 (t :: a0123456789876543210) (t :: Maybe a0123456789876543210) =+ Foo1 t t+ instance SuppressUnusedWarnings Foo1Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo1Sym1KindInference) GHC.Tuple.())+ data Foo1Sym1 (l :: a0123456789876543210) (l :: TyFun (Maybe a0123456789876543210) a0123456789876543210)+ = forall arg. SameKind (Apply (Foo1Sym1 l) arg) (Foo1Sym2 l arg) =>+ Foo1Sym1KindInference+ type instance Apply (Foo1Sym1 l) l = Foo1 l l+ instance SuppressUnusedWarnings Foo1Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo1Sym0KindInference) GHC.Tuple.())+ data Foo1Sym0 (l :: TyFun a0123456789876543210 (TyFun (Maybe a0123456789876543210) a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>+ Foo1Sym0KindInference+ type instance Apply Foo1Sym0 l = Foo1Sym1 l+ type family Foo3 (a :: a) (a :: b) :: a where+ Foo3 a b = Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) (Apply (Apply Tuple2Sym0 a) b)+ type family Foo2 (a :: a) (a :: Maybe a) :: a where+ Foo2 d _z_0123456789876543210 = Apply (Apply Lambda_0123456789876543210Sym0 d) (Apply JustSym0 d)+ type family Foo1 (a :: a) (a :: Maybe a) :: a where+ Foo1 d x = Apply (Apply (Apply Lambda_0123456789876543210Sym0 d) x) x+ sFoo3 ::+ forall (t :: a) (t :: b).+ Sing t -> Sing t -> Sing (Apply (Apply Foo3Sym0 t) t :: a)+ sFoo2 ::+ forall (t :: a) (t :: Maybe a).+ Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)+ sFoo1 ::+ forall (t :: a) (t :: Maybe a).+ Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)+ sFoo3 (sA :: Sing a) (sB :: Sing b)+ = (applySing+ ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 a) b))+ (\ sX_0123456789876543210+ -> case sX_0123456789876543210 of {+ _ :: Sing x_0123456789876543210+ -> case sX_0123456789876543210 of {+ STuple2 (sP :: Sing p) _ -> sP } ::+ Sing (Case_0123456789876543210 a b x_0123456789876543210 x_0123456789876543210) })))+ ((applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sA)) sB)+ sFoo2 (sD :: Sing d) _+ = (applySing+ ((singFun1 @(Apply Lambda_0123456789876543210Sym0 d))+ (\ sX_0123456789876543210+ -> case sX_0123456789876543210 of {+ _ :: Sing x_0123456789876543210+ -> case sX_0123456789876543210 of+ SJust (sY :: Sing y) -> sY+ SNothing -> sD ::+ Sing (Case_0123456789876543210 d x_0123456789876543210 x_0123456789876543210) })))+ ((applySing ((singFun1 @JustSym0) SJust)) sD)+ sFoo1 (sD :: Sing d) (sX :: Sing x)+ = (applySing+ ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 d) x))+ (\ sX_0123456789876543210+ -> case sX_0123456789876543210 of {+ _ :: Sing x_0123456789876543210+ -> case sX_0123456789876543210 of+ SJust (sY :: Sing y) -> sY+ SNothing -> sD ::+ Sing (Case_0123456789876543210 d x x_0123456789876543210 x_0123456789876543210) })))+ sX
− tests/compile-and-dump/Singletons/Lambdas.ghc80.template
@@ -1,842 +0,0 @@-Singletons/Lambdas.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| foo0 :: a -> b -> a- foo0 = (\ x y -> x)- foo1 :: a -> b -> a- foo1 x = (\ _ -> x)- foo2 :: a -> b -> a- foo2 x y = (\ _ -> x) y- foo3 :: a -> a- foo3 x = (\ y -> y) x- foo4 :: a -> b -> c -> a- foo4 x y z = (\ _ _ -> x) y z- foo5 :: a -> b -> b- foo5 x y = (\ x -> x) y- foo6 :: a -> b -> a- foo6 a b = (\ x -> \ _ -> x) a b- foo7 :: a -> b -> b- foo7 x y = (\ (_, b) -> b) (x, y)- foo8 :: Foo a b -> a- foo8 x = (\ (Foo a _) -> a) x- - data Foo a b = Foo a b |]- ======>- foo0 :: forall a b. a -> b -> a- foo0 = \ x y -> x- foo1 :: forall a b. a -> b -> a- foo1 x = \ _ -> x- foo2 :: forall a b. a -> b -> a- foo2 x y = (\ _ -> x) y- foo3 :: forall a. a -> a- foo3 x = (\ y -> y) x- foo4 :: forall a b c. a -> b -> c -> a- foo4 x y z = (\ _ _ -> x) y z- foo5 :: forall a b. a -> b -> b- foo5 x y = (\ x -> x) y- foo6 :: forall a b. a -> b -> a- foo6 a b = (\ x -> \ _ -> x) a b- foo7 :: forall a b. a -> b -> b- foo7 x y = (\ (_, b) -> b) (x, y)- data Foo a b = Foo a b- foo8 :: forall a b. Foo a b -> a- foo8 x = (\ (Foo a _) -> a) x- type FooSym2 (t :: a0123456789) (t :: b0123456789) = Foo t t- instance SuppressUnusedWarnings FooSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym1KindInference GHC.Tuple.())- data FooSym1 (l :: a0123456789)- (l :: TyFun b0123456789 (Foo a0123456789 b0123456789))- = forall arg. KindOf (Apply (FooSym1 l) arg) ~ KindOf (FooSym2 l arg) =>- FooSym1KindInference- type instance Apply (FooSym1 l) l = FooSym2 l l- instance SuppressUnusedWarnings FooSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym0KindInference GHC.Tuple.())- data FooSym0 (l :: TyFun a0123456789 (TyFun b0123456789 (Foo a0123456789 b0123456789)- -> GHC.Types.Type))- = forall arg. KindOf (Apply FooSym0 arg) ~ KindOf (FooSym1 arg) =>- FooSym0KindInference- type instance Apply FooSym0 l = FooSym1 l- type family Case_0123456789 x arg_0123456789 t where- Case_0123456789 x arg_0123456789 (Foo a _z_0123456789) = a- type family Lambda_0123456789 x t where- Lambda_0123456789 x arg_0123456789 = Case_0123456789 x arg_0123456789 arg_0123456789- type Lambda_0123456789Sym2 t t = Lambda_0123456789 t t- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Case_0123456789 x y arg_0123456789 t where- Case_0123456789 x y arg_0123456789 '(_z_0123456789, b) = b- type family Lambda_0123456789 x y t where- Lambda_0123456789 x y arg_0123456789 = Case_0123456789 x y arg_0123456789 arg_0123456789- type Lambda_0123456789Sym3 t t t = Lambda_0123456789 t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Case_0123456789 a b x arg_0123456789 t where- Case_0123456789 a b x arg_0123456789 _z_0123456789 = x- type family Lambda_0123456789 a b x t where- Lambda_0123456789 a b x arg_0123456789 = Case_0123456789 a b x arg_0123456789 arg_0123456789- type Lambda_0123456789Sym4 t t t t = Lambda_0123456789 t t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym3 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym3KindInference GHC.Tuple.())- data Lambda_0123456789Sym3 l l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym3 l l l) arg) ~ KindOf (Lambda_0123456789Sym4 l l l arg) =>- Lambda_0123456789Sym3KindInference- type instance Apply (Lambda_0123456789Sym3 l l l) l = Lambda_0123456789Sym4 l l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Lambda_0123456789 a b t where- Lambda_0123456789 a b x = Apply (Apply (Apply Lambda_0123456789Sym0 a) b) x- type Lambda_0123456789Sym3 t t t = Lambda_0123456789 t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Lambda_0123456789 x y t where- Lambda_0123456789 x y x = x- type Lambda_0123456789Sym3 t t t = Lambda_0123456789 t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Case_0123456789 x- y- z- arg_0123456789- arg_0123456789- t where- Case_0123456789 x y z arg_0123456789 arg_0123456789 '(_z_0123456789,- _z_0123456789) = x- type family Lambda_0123456789 x y z t t where- Lambda_0123456789 x y z arg_0123456789 arg_0123456789 = Case_0123456789 x y z arg_0123456789 arg_0123456789 (Apply (Apply Tuple2Sym0 arg_0123456789) arg_0123456789)- type Lambda_0123456789Sym5 t t t t t = Lambda_0123456789 t t t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym4 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym4KindInference GHC.Tuple.())- data Lambda_0123456789Sym4 l l l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym4 l l l l) arg) ~ KindOf (Lambda_0123456789Sym5 l l l l arg) =>- Lambda_0123456789Sym4KindInference- type instance Apply (Lambda_0123456789Sym4 l l l l) l = Lambda_0123456789Sym5 l l l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym3 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym3KindInference GHC.Tuple.())- data Lambda_0123456789Sym3 l l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym3 l l l) arg) ~ KindOf (Lambda_0123456789Sym4 l l l arg) =>- Lambda_0123456789Sym3KindInference- type instance Apply (Lambda_0123456789Sym3 l l l) l = Lambda_0123456789Sym4 l l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Lambda_0123456789 x t where- Lambda_0123456789 x y = y- type Lambda_0123456789Sym2 t t = Lambda_0123456789 t t- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Case_0123456789 x y arg_0123456789 t where- Case_0123456789 x y arg_0123456789 _z_0123456789 = x- type family Lambda_0123456789 x y t where- Lambda_0123456789 x y arg_0123456789 = Case_0123456789 x y arg_0123456789 arg_0123456789- type Lambda_0123456789Sym3 t t t = Lambda_0123456789 t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Case_0123456789 x arg_0123456789 a_0123456789 t where- Case_0123456789 x arg_0123456789 a_0123456789 _z_0123456789 = x- type family Lambda_0123456789 x a_0123456789 t where- Lambda_0123456789 x a_0123456789 arg_0123456789 = Case_0123456789 x arg_0123456789 a_0123456789 arg_0123456789- type Lambda_0123456789Sym3 t t t = Lambda_0123456789 t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Lambda_0123456789 a_0123456789 a_0123456789 t t where- Lambda_0123456789 a_0123456789 a_0123456789 x y = x- type Lambda_0123456789Sym4 t t t t = Lambda_0123456789 t t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym3 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym3KindInference GHC.Tuple.())- data Lambda_0123456789Sym3 l l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym3 l l l) arg) ~ KindOf (Lambda_0123456789Sym4 l l l arg) =>- Lambda_0123456789Sym3KindInference- type instance Apply (Lambda_0123456789Sym3 l l l) l = Lambda_0123456789Sym4 l l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type Foo8Sym1 (t :: Foo a0123456789 b0123456789) = Foo8 t- instance SuppressUnusedWarnings Foo8Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo8Sym0KindInference GHC.Tuple.())- data Foo8Sym0 (l :: TyFun (Foo a0123456789 b0123456789) a0123456789)- = forall arg. KindOf (Apply Foo8Sym0 arg) ~ KindOf (Foo8Sym1 arg) =>- Foo8Sym0KindInference- type instance Apply Foo8Sym0 l = Foo8Sym1 l- type Foo7Sym2 (t :: a0123456789) (t :: b0123456789) = Foo7 t t- instance SuppressUnusedWarnings Foo7Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo7Sym1KindInference GHC.Tuple.())- data Foo7Sym1 (l :: a0123456789)- (l :: TyFun b0123456789 b0123456789)- = forall arg. KindOf (Apply (Foo7Sym1 l) arg) ~ KindOf (Foo7Sym2 l arg) =>- Foo7Sym1KindInference- type instance Apply (Foo7Sym1 l) l = Foo7Sym2 l l- instance SuppressUnusedWarnings Foo7Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo7Sym0KindInference GHC.Tuple.())- data Foo7Sym0 (l :: TyFun a0123456789 (TyFun b0123456789 b0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo7Sym0 arg) ~ KindOf (Foo7Sym1 arg) =>- Foo7Sym0KindInference- type instance Apply Foo7Sym0 l = Foo7Sym1 l- type Foo6Sym2 (t :: a0123456789) (t :: b0123456789) = Foo6 t t- instance SuppressUnusedWarnings Foo6Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo6Sym1KindInference GHC.Tuple.())- data Foo6Sym1 (l :: a0123456789)- (l :: TyFun b0123456789 a0123456789)- = forall arg. KindOf (Apply (Foo6Sym1 l) arg) ~ KindOf (Foo6Sym2 l arg) =>- Foo6Sym1KindInference- type instance Apply (Foo6Sym1 l) l = Foo6Sym2 l l- instance SuppressUnusedWarnings Foo6Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo6Sym0KindInference GHC.Tuple.())- data Foo6Sym0 (l :: TyFun a0123456789 (TyFun b0123456789 a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo6Sym0 arg) ~ KindOf (Foo6Sym1 arg) =>- Foo6Sym0KindInference- type instance Apply Foo6Sym0 l = Foo6Sym1 l- type Foo5Sym2 (t :: a0123456789) (t :: b0123456789) = Foo5 t t- instance SuppressUnusedWarnings Foo5Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo5Sym1KindInference GHC.Tuple.())- data Foo5Sym1 (l :: a0123456789)- (l :: TyFun b0123456789 b0123456789)- = forall arg. KindOf (Apply (Foo5Sym1 l) arg) ~ KindOf (Foo5Sym2 l arg) =>- Foo5Sym1KindInference- type instance Apply (Foo5Sym1 l) l = Foo5Sym2 l l- instance SuppressUnusedWarnings Foo5Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo5Sym0KindInference GHC.Tuple.())- data Foo5Sym0 (l :: TyFun a0123456789 (TyFun b0123456789 b0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo5Sym0 arg) ~ KindOf (Foo5Sym1 arg) =>- Foo5Sym0KindInference- type instance Apply Foo5Sym0 l = Foo5Sym1 l- type Foo4Sym3 (t :: a0123456789)- (t :: b0123456789)- (t :: c0123456789) =- Foo4 t t t- instance SuppressUnusedWarnings Foo4Sym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo4Sym2KindInference GHC.Tuple.())- data Foo4Sym2 (l :: a0123456789)- (l :: b0123456789)- (l :: TyFun c0123456789 a0123456789)- = forall arg. KindOf (Apply (Foo4Sym2 l l) arg) ~ KindOf (Foo4Sym3 l l arg) =>- Foo4Sym2KindInference- type instance Apply (Foo4Sym2 l l) l = Foo4Sym3 l l l- instance SuppressUnusedWarnings Foo4Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo4Sym1KindInference GHC.Tuple.())- data Foo4Sym1 (l :: a0123456789)- (l :: TyFun b0123456789 (TyFun c0123456789 a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply (Foo4Sym1 l) arg) ~ KindOf (Foo4Sym2 l arg) =>- Foo4Sym1KindInference- type instance Apply (Foo4Sym1 l) l = Foo4Sym2 l l- instance SuppressUnusedWarnings Foo4Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo4Sym0KindInference GHC.Tuple.())- data Foo4Sym0 (l :: TyFun a0123456789 (TyFun b0123456789 (TyFun c0123456789 a0123456789- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo4Sym0 arg) ~ KindOf (Foo4Sym1 arg) =>- Foo4Sym0KindInference- type instance Apply Foo4Sym0 l = Foo4Sym1 l- type Foo3Sym1 (t :: a0123456789) = Foo3 t- instance SuppressUnusedWarnings Foo3Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo3Sym0KindInference GHC.Tuple.())- data Foo3Sym0 (l :: TyFun a0123456789 a0123456789)- = forall arg. KindOf (Apply Foo3Sym0 arg) ~ KindOf (Foo3Sym1 arg) =>- Foo3Sym0KindInference- type instance Apply Foo3Sym0 l = Foo3Sym1 l- type Foo2Sym2 (t :: a0123456789) (t :: b0123456789) = Foo2 t t- instance SuppressUnusedWarnings Foo2Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo2Sym1KindInference GHC.Tuple.())- data Foo2Sym1 (l :: a0123456789)- (l :: TyFun b0123456789 a0123456789)- = forall arg. KindOf (Apply (Foo2Sym1 l) arg) ~ KindOf (Foo2Sym2 l arg) =>- Foo2Sym1KindInference- type instance Apply (Foo2Sym1 l) l = Foo2Sym2 l l- instance SuppressUnusedWarnings Foo2Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo2Sym0KindInference GHC.Tuple.())- data Foo2Sym0 (l :: TyFun a0123456789 (TyFun b0123456789 a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo2Sym0 arg) ~ KindOf (Foo2Sym1 arg) =>- Foo2Sym0KindInference- type instance Apply Foo2Sym0 l = Foo2Sym1 l- type Foo1Sym2 (t :: a0123456789) (t :: b0123456789) = Foo1 t t- instance SuppressUnusedWarnings Foo1Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo1Sym1KindInference GHC.Tuple.())- data Foo1Sym1 (l :: a0123456789)- (l :: TyFun b0123456789 a0123456789)- = forall arg. KindOf (Apply (Foo1Sym1 l) arg) ~ KindOf (Foo1Sym2 l arg) =>- Foo1Sym1KindInference- type instance Apply (Foo1Sym1 l) l = Foo1Sym2 l l- instance SuppressUnusedWarnings Foo1Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo1Sym0KindInference GHC.Tuple.())- data Foo1Sym0 (l :: TyFun a0123456789 (TyFun b0123456789 a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo1Sym0 arg) ~ KindOf (Foo1Sym1 arg) =>- Foo1Sym0KindInference- type instance Apply Foo1Sym0 l = Foo1Sym1 l- type Foo0Sym2 (t :: a0123456789) (t :: b0123456789) = Foo0 t t- instance SuppressUnusedWarnings Foo0Sym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo0Sym1KindInference GHC.Tuple.())- data Foo0Sym1 (l :: a0123456789)- (l :: TyFun b0123456789 a0123456789)- = forall arg. KindOf (Apply (Foo0Sym1 l) arg) ~ KindOf (Foo0Sym2 l arg) =>- Foo0Sym1KindInference- type instance Apply (Foo0Sym1 l) l = Foo0Sym2 l l- instance SuppressUnusedWarnings Foo0Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo0Sym0KindInference GHC.Tuple.())- data Foo0Sym0 (l :: TyFun a0123456789 (TyFun b0123456789 a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply Foo0Sym0 arg) ~ KindOf (Foo0Sym1 arg) =>- Foo0Sym0KindInference- type instance Apply Foo0Sym0 l = Foo0Sym1 l- type family Foo8 (a :: Foo a b) :: a where- Foo8 x = Apply (Apply Lambda_0123456789Sym0 x) x- type family Foo7 (a :: a) (a :: b) :: b where- Foo7 x y = Apply (Apply (Apply Lambda_0123456789Sym0 x) y) (Apply (Apply Tuple2Sym0 x) y)- type family Foo6 (a :: a) (a :: b) :: a where- Foo6 a b = Apply (Apply (Apply (Apply Lambda_0123456789Sym0 a) b) a) b- type family Foo5 (a :: a) (a :: b) :: b where- Foo5 x y = Apply (Apply (Apply Lambda_0123456789Sym0 x) y) y- type family Foo4 (a :: a) (a :: b) (a :: c) :: a where- Foo4 x y z = Apply (Apply (Apply (Apply (Apply Lambda_0123456789Sym0 x) y) z) y) z- type family Foo3 (a :: a) :: a where- Foo3 x = Apply (Apply Lambda_0123456789Sym0 x) x- type family Foo2 (a :: a) (a :: b) :: a where- Foo2 x y = Apply (Apply (Apply Lambda_0123456789Sym0 x) y) y- type family Foo1 (a :: a) (a :: b) :: a where- Foo1 x a_0123456789 = Apply (Apply (Apply Lambda_0123456789Sym0 x) a_0123456789) a_0123456789- type family Foo0 (a :: a) (a :: b) :: a where- Foo0 a_0123456789 a_0123456789 = Apply (Apply (Apply (Apply Lambda_0123456789Sym0 a_0123456789) a_0123456789) a_0123456789) a_0123456789- sFoo8 ::- forall (t :: Foo a b). Sing t -> Sing (Apply Foo8Sym0 t :: a)- sFoo7 ::- forall (t :: a) (t :: b).- Sing t -> Sing t -> Sing (Apply (Apply Foo7Sym0 t) t :: b)- sFoo6 ::- forall (t :: a) (t :: b).- Sing t -> Sing t -> Sing (Apply (Apply Foo6Sym0 t) t :: a)- sFoo5 ::- forall (t :: a) (t :: b).- Sing t -> Sing t -> Sing (Apply (Apply Foo5Sym0 t) t :: b)- sFoo4 ::- forall (t :: a) (t :: b) (t :: c).- Sing t- -> Sing t- -> Sing t -> Sing (Apply (Apply (Apply Foo4Sym0 t) t) t :: a)- sFoo3 :: forall (t :: a). Sing t -> Sing (Apply Foo3Sym0 t :: a)- sFoo2 ::- forall (t :: a) (t :: b).- Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)- sFoo1 ::- forall (t :: a) (t :: b).- Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)- sFoo0 ::- forall (t :: a) (t :: b).- Sing t -> Sing t -> Sing (Apply (Apply Foo0Sym0 t) t :: a)- sFoo8 sX- = let- lambda :: forall x. t ~ x => Sing x -> Sing (Apply Foo8Sym0 t :: a)- lambda x- = applySing- (singFun1- (Proxy :: Proxy (Apply Lambda_0123456789Sym0 x))- (\ sArg_0123456789- -> let- lambda ::- forall arg_0123456789.- Sing arg_0123456789- -> Sing (Apply (Apply Lambda_0123456789Sym0 x) arg_0123456789)- lambda arg_0123456789- = case arg_0123456789 of {- SFoo sA _s_z_0123456789- -> let- lambda ::- forall a _z_0123456789.- Apply (Apply FooSym0 a) _z_0123456789 ~ arg_0123456789 =>- Sing a- -> Sing _z_0123456789- -> Sing (Case_0123456789 x arg_0123456789 (Apply (Apply FooSym0 a) _z_0123456789))- lambda a _z_0123456789 = a- in lambda sA _s_z_0123456789 } ::- Sing (Case_0123456789 x arg_0123456789 arg_0123456789)- in lambda sArg_0123456789))- x- in lambda sX- sFoo7 sX sY- = let- lambda ::- forall x y.- (t ~ x, t ~ y) =>- Sing x -> Sing y -> Sing (Apply (Apply Foo7Sym0 t) t :: b)- lambda x y- = applySing- (singFun1- (Proxy :: Proxy (Apply (Apply Lambda_0123456789Sym0 x) y))- (\ sArg_0123456789- -> let- lambda ::- forall arg_0123456789.- Sing arg_0123456789- -> Sing (Apply (Apply (Apply Lambda_0123456789Sym0 x) y) arg_0123456789)- lambda arg_0123456789- = case arg_0123456789 of {- STuple2 _s_z_0123456789 sB- -> let- lambda ::- forall _z_0123456789 b.- Apply (Apply Tuple2Sym0 _z_0123456789) b ~ arg_0123456789 =>- Sing _z_0123456789- -> Sing b- -> Sing (Case_0123456789 x y arg_0123456789 (Apply (Apply Tuple2Sym0 _z_0123456789) b))- lambda _z_0123456789 b = b- in lambda _s_z_0123456789 sB } ::- Sing (Case_0123456789 x y arg_0123456789 arg_0123456789)- in lambda sArg_0123456789))- (applySing- (applySing (singFun2 (Proxy :: Proxy Tuple2Sym0) STuple2) x) y)- in lambda sX sY- sFoo6 sA sB- = let- lambda ::- forall a b.- (t ~ a, t ~ b) =>- Sing a -> Sing b -> Sing (Apply (Apply Foo6Sym0 t) t :: a)- lambda a b- = applySing- (applySing- (singFun1- (Proxy :: Proxy (Apply (Apply Lambda_0123456789Sym0 a) b))- (\ sX- -> let- lambda ::- forall x.- Sing x -> Sing (Apply (Apply (Apply Lambda_0123456789Sym0 a) b) x)- lambda x- = singFun1- (Proxy ::- Proxy (Apply (Apply (Apply Lambda_0123456789Sym0 a) b) x))- (\ sArg_0123456789- -> let- lambda ::- forall arg_0123456789.- Sing arg_0123456789- -> Sing (Apply (Apply (Apply (Apply Lambda_0123456789Sym0 a) b) x) arg_0123456789)- lambda arg_0123456789- = case arg_0123456789 of {- _s_z_0123456789- -> let- lambda ::- forall _z_0123456789.- _z_0123456789 ~ arg_0123456789 =>- Sing _z_0123456789- -> Sing (Case_0123456789 a b x arg_0123456789 _z_0123456789)- lambda _z_0123456789 = x- in lambda _s_z_0123456789 } ::- Sing (Case_0123456789 a b x arg_0123456789 arg_0123456789)- in lambda sArg_0123456789)- in lambda sX))- a)- b- in lambda sA sB- sFoo5 sX sY- = let- lambda ::- forall x y.- (t ~ x, t ~ y) =>- Sing x -> Sing y -> Sing (Apply (Apply Foo5Sym0 t) t :: b)- lambda x y- = applySing- (singFun1- (Proxy :: Proxy (Apply (Apply Lambda_0123456789Sym0 x) y))- (\ sX- -> let- lambda ::- forall x.- Sing x -> Sing (Apply (Apply (Apply Lambda_0123456789Sym0 x) y) x)- lambda x = x- in lambda sX))- y- in lambda sX sY- sFoo4 sX sY sZ- = let- lambda ::- forall x y z.- (t ~ x, t ~ y, t ~ z) =>- Sing x- -> Sing y- -> Sing z -> Sing (Apply (Apply (Apply Foo4Sym0 t) t) t :: a)- lambda x y z- = applySing- (applySing- (singFun2- (Proxy ::- Proxy (Apply (Apply (Apply Lambda_0123456789Sym0 x) y) z))- (\ sArg_0123456789 sArg_0123456789- -> let- lambda ::- forall arg_0123456789 arg_0123456789.- Sing arg_0123456789- -> Sing arg_0123456789- -> Sing (Apply (Apply (Apply (Apply (Apply Lambda_0123456789Sym0 x) y) z) arg_0123456789) arg_0123456789)- lambda arg_0123456789 arg_0123456789- = case- applySing- (applySing- (singFun2 (Proxy :: Proxy Tuple2Sym0) STuple2)- arg_0123456789)- arg_0123456789- of {- STuple2 _s_z_0123456789 _s_z_0123456789- -> let- lambda ::- forall _z_0123456789 _z_0123456789.- Apply (Apply Tuple2Sym0 _z_0123456789) _z_0123456789 ~ Apply (Apply Tuple2Sym0 arg_0123456789) arg_0123456789 =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 x y z arg_0123456789 arg_0123456789 (Apply (Apply Tuple2Sym0 _z_0123456789) _z_0123456789))- lambda _z_0123456789 _z_0123456789 = x- in lambda _s_z_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 x y z arg_0123456789 arg_0123456789 (Apply (Apply Tuple2Sym0 arg_0123456789) arg_0123456789))- in lambda sArg_0123456789 sArg_0123456789))- y)- z- in lambda sX sY sZ- sFoo3 sX- = let- lambda :: forall x. t ~ x => Sing x -> Sing (Apply Foo3Sym0 t :: a)- lambda x- = applySing- (singFun1- (Proxy :: Proxy (Apply Lambda_0123456789Sym0 x))- (\ sY- -> let- lambda ::- forall y. Sing y -> Sing (Apply (Apply Lambda_0123456789Sym0 x) y)- lambda y = y- in lambda sY))- x- in lambda sX- sFoo2 sX sY- = let- lambda ::- forall x y.- (t ~ x, t ~ y) =>- Sing x -> Sing y -> Sing (Apply (Apply Foo2Sym0 t) t :: a)- lambda x y- = applySing- (singFun1- (Proxy :: Proxy (Apply (Apply Lambda_0123456789Sym0 x) y))- (\ sArg_0123456789- -> let- lambda ::- forall arg_0123456789.- Sing arg_0123456789- -> Sing (Apply (Apply (Apply Lambda_0123456789Sym0 x) y) arg_0123456789)- lambda arg_0123456789- = case arg_0123456789 of {- _s_z_0123456789- -> let- lambda ::- forall _z_0123456789.- _z_0123456789 ~ arg_0123456789 =>- Sing _z_0123456789- -> Sing (Case_0123456789 x y arg_0123456789 _z_0123456789)- lambda _z_0123456789 = x- in lambda _s_z_0123456789 } ::- Sing (Case_0123456789 x y arg_0123456789 arg_0123456789)- in lambda sArg_0123456789))- y- in lambda sX sY- sFoo1 sX sA_0123456789- = let- lambda ::- forall x a_0123456789.- (t ~ x, t ~ a_0123456789) =>- Sing x- -> Sing a_0123456789 -> Sing (Apply (Apply Foo1Sym0 t) t :: a)- lambda x a_0123456789- = applySing- (singFun1- (Proxy ::- Proxy (Apply (Apply Lambda_0123456789Sym0 x) a_0123456789))- (\ sArg_0123456789- -> let- lambda ::- forall arg_0123456789.- Sing arg_0123456789- -> Sing (Apply (Apply (Apply Lambda_0123456789Sym0 x) a_0123456789) arg_0123456789)- lambda arg_0123456789- = case arg_0123456789 of {- _s_z_0123456789- -> let- lambda ::- forall _z_0123456789.- _z_0123456789 ~ arg_0123456789 =>- Sing _z_0123456789- -> Sing (Case_0123456789 x arg_0123456789 a_0123456789 _z_0123456789)- lambda _z_0123456789 = x- in lambda _s_z_0123456789 } ::- Sing (Case_0123456789 x arg_0123456789 a_0123456789 arg_0123456789)- in lambda sArg_0123456789))- a_0123456789- in lambda sX sA_0123456789- sFoo0 sA_0123456789 sA_0123456789- = let- lambda ::- forall a_0123456789 a_0123456789.- (t ~ a_0123456789, t ~ a_0123456789) =>- Sing a_0123456789- -> Sing a_0123456789 -> Sing (Apply (Apply Foo0Sym0 t) t :: a)- lambda a_0123456789 a_0123456789- = applySing- (applySing- (singFun2- (Proxy ::- Proxy (Apply (Apply Lambda_0123456789Sym0 a_0123456789) a_0123456789))- (\ sX sY- -> let- lambda ::- forall x y.- Sing x- -> Sing y- -> Sing (Apply (Apply (Apply (Apply Lambda_0123456789Sym0 a_0123456789) a_0123456789) x) y)- lambda x y = x- in lambda sX sY))- a_0123456789)- a_0123456789- in lambda sA_0123456789 sA_0123456789- data instance Sing (z :: Foo a b)- = forall (n :: a) (n :: b). z ~ Foo n n =>- SFoo (Sing (n :: a)) (Sing (n :: b))- type SFoo = (Sing :: Foo a b -> GHC.Types.Type)- instance (SingKind a, SingKind b) => SingKind (Foo a b) where- type DemoteRep (Foo a b) = Foo (DemoteRep a) (DemoteRep b)- fromSing (SFoo b b) = Foo (fromSing b) (fromSing b)- toSing (Foo b b)- = case- GHC.Tuple.(,) (toSing b :: SomeSing a) (toSing b :: SomeSing b)- of {- GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing (SFoo c c) }- instance (SingI n, SingI n) => SingI (Foo (n :: a) (n :: b)) where- sing = SFoo sing sing
+ tests/compile-and-dump/Singletons/Lambdas.ghc82.template view
@@ -0,0 +1,704 @@+Singletons/Lambdas.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| foo0 :: a -> b -> a+ foo0 = (\ x y -> x)+ foo1 :: a -> b -> a+ foo1 x = (\ _ -> x)+ foo2 :: a -> b -> a+ foo2 x y = (\ _ -> x) y+ foo3 :: a -> a+ foo3 x = (\ y -> y) x+ foo4 :: a -> b -> c -> a+ foo4 x y z = (\ _ _ -> x) y z+ foo5 :: a -> b -> b+ foo5 x y = (\ x -> x) y+ foo6 :: a -> b -> a+ foo6 a b = (\ x -> \ _ -> x) a b+ foo7 :: a -> b -> b+ foo7 x y = (\ (_, b) -> b) (x, y)+ foo8 :: Foo a b -> a+ foo8 x = (\ (Foo a _) -> a) x+ + data Foo a b = Foo a b |]+ ======>+ foo0 :: a -> b -> a+ foo0 = \ x y -> x+ foo1 :: a -> b -> a+ foo1 x = \ _ -> x+ foo2 :: a -> b -> a+ foo2 x y = (\ _ -> x) y+ foo3 :: a -> a+ foo3 x = (\ y -> y) x+ foo4 :: a -> b -> c -> a+ foo4 x y z = ((\ _ _ -> x) y) z+ foo5 :: a -> b -> b+ foo5 x y = (\ x -> x) y+ foo6 :: a -> b -> a+ foo6 a b = ((\ x -> \ _ -> x) a) b+ foo7 :: a -> b -> b+ foo7 x y = (\ (_, b) -> b) (x, y)+ data Foo a b = Foo a b+ foo8 :: Foo a b -> a+ foo8 x = (\ Foo a _ -> a) x+ type FooSym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Foo t t+ instance SuppressUnusedWarnings FooSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym1KindInference) GHC.Tuple.())+ data FooSym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 (Foo a0123456789876543210 b0123456789876543210))+ = forall arg. SameKind (Apply (FooSym1 l) arg) (FooSym2 l arg) =>+ FooSym1KindInference+ type instance Apply (FooSym1 l) l = Foo l l+ instance SuppressUnusedWarnings FooSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym0KindInference) GHC.Tuple.())+ data FooSym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 (Foo a0123456789876543210 b0123456789876543210)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>+ FooSym0KindInference+ type instance Apply FooSym0 l = FooSym1 l+ type family Case_0123456789876543210 x arg_0123456789876543210 t where+ Case_0123456789876543210 x arg_0123456789876543210 (Foo a _z_0123456789876543210) = a+ type family Lambda_0123456789876543210 x t where+ Lambda_0123456789876543210 x arg_0123456789876543210 = Case_0123456789876543210 x arg_0123456789876543210 arg_0123456789876543210+ type Lambda_0123456789876543210Sym2 t t =+ Lambda_0123456789876543210 t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Case_0123456789876543210 x y arg_0123456789876543210 t where+ Case_0123456789876543210 x y arg_0123456789876543210 '(_z_0123456789876543210,+ b) = b+ type family Lambda_0123456789876543210 x y t where+ Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210+ type Lambda_0123456789876543210Sym3 t t t =+ Lambda_0123456789876543210 t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Case_0123456789876543210 a b x arg_0123456789876543210 t where+ Case_0123456789876543210 a b x arg_0123456789876543210 _z_0123456789876543210 = x+ type family Lambda_0123456789876543210 a b x t where+ Lambda_0123456789876543210 a b x arg_0123456789876543210 = Case_0123456789876543210 a b x arg_0123456789876543210 arg_0123456789876543210+ type Lambda_0123456789876543210Sym4 t t t t =+ Lambda_0123456789876543210 t t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym3 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym3KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym3 l l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym3 l l l) arg) (Lambda_0123456789876543210Sym4 l l l arg) =>+ Lambda_0123456789876543210Sym3KindInference+ type instance Apply (Lambda_0123456789876543210Sym3 l l l) l = Lambda_0123456789876543210 l l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210Sym3 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Lambda_0123456789876543210 a b t where+ Lambda_0123456789876543210 a b x = Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) x+ type Lambda_0123456789876543210Sym3 t t t =+ Lambda_0123456789876543210 t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Lambda_0123456789876543210 x y t where+ Lambda_0123456789876543210 x y x = x+ type Lambda_0123456789876543210Sym3 t t t =+ Lambda_0123456789876543210 t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Case_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 t where+ Case_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 '(_z_0123456789876543210,+ _z_0123456789876543210) = x+ type family Lambda_0123456789876543210 x y z t t where+ Lambda_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 (Apply (Apply Tuple2Sym0 arg_0123456789876543210) arg_0123456789876543210)+ type Lambda_0123456789876543210Sym5 t t t t t =+ Lambda_0123456789876543210 t t t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym4 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym4KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym4 l l l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym4 l l l l) arg) (Lambda_0123456789876543210Sym5 l l l l arg) =>+ Lambda_0123456789876543210Sym4KindInference+ type instance Apply (Lambda_0123456789876543210Sym4 l l l l) l = Lambda_0123456789876543210 l l l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym3 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym3KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym3 l l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym3 l l l) arg) (Lambda_0123456789876543210Sym4 l l l arg) =>+ Lambda_0123456789876543210Sym3KindInference+ type instance Apply (Lambda_0123456789876543210Sym3 l l l) l = Lambda_0123456789876543210Sym4 l l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210Sym3 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Lambda_0123456789876543210 x t where+ Lambda_0123456789876543210 x y = y+ type Lambda_0123456789876543210Sym2 t t =+ Lambda_0123456789876543210 t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Case_0123456789876543210 x y arg_0123456789876543210 t where+ Case_0123456789876543210 x y arg_0123456789876543210 _z_0123456789876543210 = x+ type family Lambda_0123456789876543210 x y t where+ Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210+ type Lambda_0123456789876543210Sym3 t t t =+ Lambda_0123456789876543210 t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Case_0123456789876543210 x arg_0123456789876543210 a_0123456789876543210 t where+ Case_0123456789876543210 x arg_0123456789876543210 a_0123456789876543210 _z_0123456789876543210 = x+ type family Lambda_0123456789876543210 x a_0123456789876543210 t where+ Lambda_0123456789876543210 x a_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 x arg_0123456789876543210 a_0123456789876543210 arg_0123456789876543210+ type Lambda_0123456789876543210Sym3 t t t =+ Lambda_0123456789876543210 t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where+ Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 x y = x+ type Lambda_0123456789876543210Sym4 t t t t =+ Lambda_0123456789876543210 t t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym3 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym3KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym3 l l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym3 l l l) arg) (Lambda_0123456789876543210Sym4 l l l arg) =>+ Lambda_0123456789876543210Sym3KindInference+ type instance Apply (Lambda_0123456789876543210Sym3 l l l) l = Lambda_0123456789876543210 l l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210Sym3 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type Foo8Sym1 (t :: Foo a0123456789876543210 b0123456789876543210) =+ Foo8 t+ instance SuppressUnusedWarnings Foo8Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo8Sym0KindInference) GHC.Tuple.())+ data Foo8Sym0 (l :: TyFun (Foo a0123456789876543210 b0123456789876543210) a0123456789876543210)+ = forall arg. SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) =>+ Foo8Sym0KindInference+ type instance Apply Foo8Sym0 l = Foo8 l+ type Foo7Sym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Foo7 t t+ instance SuppressUnusedWarnings Foo7Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo7Sym1KindInference) GHC.Tuple.())+ data Foo7Sym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 b0123456789876543210)+ = forall arg. SameKind (Apply (Foo7Sym1 l) arg) (Foo7Sym2 l arg) =>+ Foo7Sym1KindInference+ type instance Apply (Foo7Sym1 l) l = Foo7 l l+ instance SuppressUnusedWarnings Foo7Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo7Sym0KindInference) GHC.Tuple.())+ data Foo7Sym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 b0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) =>+ Foo7Sym0KindInference+ type instance Apply Foo7Sym0 l = Foo7Sym1 l+ type Foo6Sym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Foo6 t t+ instance SuppressUnusedWarnings Foo6Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo6Sym1KindInference) GHC.Tuple.())+ data Foo6Sym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply (Foo6Sym1 l) arg) (Foo6Sym2 l arg) =>+ Foo6Sym1KindInference+ type instance Apply (Foo6Sym1 l) l = Foo6 l l+ instance SuppressUnusedWarnings Foo6Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo6Sym0KindInference) GHC.Tuple.())+ data Foo6Sym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) =>+ Foo6Sym0KindInference+ type instance Apply Foo6Sym0 l = Foo6Sym1 l+ type Foo5Sym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Foo5 t t+ instance SuppressUnusedWarnings Foo5Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo5Sym1KindInference) GHC.Tuple.())+ data Foo5Sym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 b0123456789876543210)+ = forall arg. SameKind (Apply (Foo5Sym1 l) arg) (Foo5Sym2 l arg) =>+ Foo5Sym1KindInference+ type instance Apply (Foo5Sym1 l) l = Foo5 l l+ instance SuppressUnusedWarnings Foo5Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo5Sym0KindInference) GHC.Tuple.())+ data Foo5Sym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 b0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) =>+ Foo5Sym0KindInference+ type instance Apply Foo5Sym0 l = Foo5Sym1 l+ type Foo4Sym3 (t :: a0123456789876543210) (t :: b0123456789876543210) (t :: c0123456789876543210) =+ Foo4 t t t+ instance SuppressUnusedWarnings Foo4Sym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo4Sym2KindInference) GHC.Tuple.())+ data Foo4Sym2 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: TyFun c0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply (Foo4Sym2 l l) arg) (Foo4Sym3 l l arg) =>+ Foo4Sym2KindInference+ type instance Apply (Foo4Sym2 l l) l = Foo4 l l l+ instance SuppressUnusedWarnings Foo4Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo4Sym1KindInference) GHC.Tuple.())+ data Foo4Sym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 (TyFun c0123456789876543210 a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (Foo4Sym1 l) arg) (Foo4Sym2 l arg) =>+ Foo4Sym1KindInference+ type instance Apply (Foo4Sym1 l) l = Foo4Sym2 l l+ instance SuppressUnusedWarnings Foo4Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo4Sym0KindInference) GHC.Tuple.())+ data Foo4Sym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 (TyFun c0123456789876543210 a0123456789876543210+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) =>+ Foo4Sym0KindInference+ type instance Apply Foo4Sym0 l = Foo4Sym1 l+ type Foo3Sym1 (t :: a0123456789876543210) = Foo3 t+ instance SuppressUnusedWarnings Foo3Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo3Sym0KindInference) GHC.Tuple.())+ data Foo3Sym0 (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>+ Foo3Sym0KindInference+ type instance Apply Foo3Sym0 l = Foo3 l+ type Foo2Sym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Foo2 t t+ instance SuppressUnusedWarnings Foo2Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo2Sym1KindInference) GHC.Tuple.())+ data Foo2Sym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply (Foo2Sym1 l) arg) (Foo2Sym2 l arg) =>+ Foo2Sym1KindInference+ type instance Apply (Foo2Sym1 l) l = Foo2 l l+ instance SuppressUnusedWarnings Foo2Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo2Sym0KindInference) GHC.Tuple.())+ data Foo2Sym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>+ Foo2Sym0KindInference+ type instance Apply Foo2Sym0 l = Foo2Sym1 l+ type Foo1Sym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Foo1 t t+ instance SuppressUnusedWarnings Foo1Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo1Sym1KindInference) GHC.Tuple.())+ data Foo1Sym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply (Foo1Sym1 l) arg) (Foo1Sym2 l arg) =>+ Foo1Sym1KindInference+ type instance Apply (Foo1Sym1 l) l = Foo1 l l+ instance SuppressUnusedWarnings Foo1Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo1Sym0KindInference) GHC.Tuple.())+ data Foo1Sym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>+ Foo1Sym0KindInference+ type instance Apply Foo1Sym0 l = Foo1Sym1 l+ type Foo0Sym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Foo0 t t+ instance SuppressUnusedWarnings Foo0Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo0Sym1KindInference) GHC.Tuple.())+ data Foo0Sym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply (Foo0Sym1 l) arg) (Foo0Sym2 l arg) =>+ Foo0Sym1KindInference+ type instance Apply (Foo0Sym1 l) l = Foo0 l l+ instance SuppressUnusedWarnings Foo0Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo0Sym0KindInference) GHC.Tuple.())+ data Foo0Sym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Foo0Sym0 arg) (Foo0Sym1 arg) =>+ Foo0Sym0KindInference+ type instance Apply Foo0Sym0 l = Foo0Sym1 l+ type family Foo8 (a :: Foo a b) :: a where+ Foo8 x = Apply (Apply Lambda_0123456789876543210Sym0 x) x+ type family Foo7 (a :: a) (a :: b) :: b where+ Foo7 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) (Apply (Apply Tuple2Sym0 x) y)+ type family Foo6 (a :: a) (a :: b) :: a where+ Foo6 a b = Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) a) b+ type family Foo5 (a :: a) (a :: b) :: b where+ Foo5 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y+ type family Foo4 (a :: a) (a :: b) (a :: c) :: a where+ Foo4 x y z = Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) z) y) z+ type family Foo3 (a :: a) :: a where+ Foo3 x = Apply (Apply Lambda_0123456789876543210Sym0 x) x+ type family Foo2 (a :: a) (a :: b) :: a where+ Foo2 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y+ type family Foo1 (a :: a) (a :: b) :: a where+ Foo1 x a_0123456789876543210 = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) a_0123456789876543210) a_0123456789876543210+ type family Foo0 (a :: a) (a :: b) :: a where+ Foo0 a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210+ sFoo8 ::+ forall (t :: Foo a b). Sing t -> Sing (Apply Foo8Sym0 t :: a)+ sFoo7 ::+ forall (t :: a) (t :: b).+ Sing t -> Sing t -> Sing (Apply (Apply Foo7Sym0 t) t :: b)+ sFoo6 ::+ forall (t :: a) (t :: b).+ Sing t -> Sing t -> Sing (Apply (Apply Foo6Sym0 t) t :: a)+ sFoo5 ::+ forall (t :: a) (t :: b).+ Sing t -> Sing t -> Sing (Apply (Apply Foo5Sym0 t) t :: b)+ sFoo4 ::+ forall (t :: a) (t :: b) (t :: c).+ Sing t+ -> Sing t+ -> Sing t -> Sing (Apply (Apply (Apply Foo4Sym0 t) t) t :: a)+ sFoo3 :: forall (t :: a). Sing t -> Sing (Apply Foo3Sym0 t :: a)+ sFoo2 ::+ forall (t :: a) (t :: b).+ Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)+ sFoo1 ::+ forall (t :: a) (t :: b).+ Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)+ sFoo0 ::+ forall (t :: a) (t :: b).+ Sing t -> Sing t -> Sing (Apply (Apply Foo0Sym0 t) t :: a)+ sFoo8 (sX :: Sing x)+ = (applySing+ ((singFun1 @(Apply Lambda_0123456789876543210Sym0 x))+ (\ sArg_0123456789876543210+ -> case sArg_0123456789876543210 of {+ _ :: Sing arg_0123456789876543210+ -> case sArg_0123456789876543210 of {+ SFoo (sA :: Sing a) _ -> sA } ::+ Sing (Case_0123456789876543210 x arg_0123456789876543210 arg_0123456789876543210) })))+ sX+ sFoo7 (sX :: Sing x) (sY :: Sing y)+ = (applySing+ ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 x) y))+ (\ sArg_0123456789876543210+ -> case sArg_0123456789876543210 of {+ _ :: Sing arg_0123456789876543210+ -> case sArg_0123456789876543210 of {+ STuple2 _ (sB :: Sing b) -> sB } ::+ Sing (Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210) })))+ ((applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sX)) sY)+ sFoo6 (sA :: Sing a) (sB :: Sing b)+ = (applySing+ ((applySing+ ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 a) b))+ (\ sX+ -> case sX of {+ _ :: Sing x+ -> (singFun1+ @(Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) x))+ (\ sArg_0123456789876543210+ -> case sArg_0123456789876543210 of {+ _ :: Sing arg_0123456789876543210+ -> case sArg_0123456789876543210 of { _ -> sX } ::+ Sing (Case_0123456789876543210 a b x arg_0123456789876543210 arg_0123456789876543210) }) })))+ sA))+ sB+ sFoo5 (sX :: Sing x) (sY :: Sing y)+ = (applySing+ ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 x) y))+ (\ sX -> case sX of { _ :: Sing x -> sX })))+ sY+ sFoo4 (sX :: Sing x) (sY :: Sing y) (sZ :: Sing z)+ = (applySing+ ((applySing+ ((singFun2+ @(Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) z))+ (\ sArg_0123456789876543210 sArg_0123456789876543210+ -> case+ (GHC.Tuple.(,) sArg_0123456789876543210) sArg_0123456789876543210+ of {+ GHC.Tuple.(,) (_ :: Sing arg_0123456789876543210)+ (_ :: Sing arg_0123456789876543210)+ -> case+ (applySing+ ((applySing ((singFun2 @Tuple2Sym0) STuple2))+ sArg_0123456789876543210))+ sArg_0123456789876543210+ of {+ STuple2 _ _ -> sX } ::+ Sing (Case_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 (Apply (Apply Tuple2Sym0 arg_0123456789876543210) arg_0123456789876543210)) })))+ sY))+ sZ+ sFoo3 (sX :: Sing x)+ = (applySing+ ((singFun1 @(Apply Lambda_0123456789876543210Sym0 x))+ (\ sY -> case sY of { _ :: Sing y -> sY })))+ sX+ sFoo2 (sX :: Sing x) (sY :: Sing y)+ = (applySing+ ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 x) y))+ (\ sArg_0123456789876543210+ -> case sArg_0123456789876543210 of {+ _ :: Sing arg_0123456789876543210+ -> case sArg_0123456789876543210 of { _ -> sX } ::+ Sing (Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210) })))+ sY+ sFoo1+ (sX :: Sing x)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ ((singFun1+ @(Apply (Apply Lambda_0123456789876543210Sym0 x) a_0123456789876543210))+ (\ sArg_0123456789876543210+ -> case sArg_0123456789876543210 of {+ _ :: Sing arg_0123456789876543210+ -> case sArg_0123456789876543210 of { _ -> sX } ::+ Sing (Case_0123456789876543210 x arg_0123456789876543210 a_0123456789876543210 arg_0123456789876543210) })))+ sA_0123456789876543210+ sFoo0+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ ((applySing+ ((singFun2+ @(Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210))+ (\ sX sY+ -> case (GHC.Tuple.(,) sX) sY of {+ GHC.Tuple.(,) (_ :: Sing x) (_ :: Sing y) -> sX })))+ sA_0123456789876543210))+ sA_0123456789876543210+ data instance Sing (z :: Foo a b)+ = forall (n :: a) (n :: b). z ~ Foo n n =>+ SFoo (Sing (n :: a)) (Sing (n :: b))+ type SFoo = (Sing :: Foo a b -> GHC.Types.Type)+ instance (SingKind a, SingKind b) => SingKind (Foo a b) where+ type Demote (Foo a b) = Foo (Demote a) (Demote b)+ fromSing (SFoo b b) = (Foo (fromSing b)) (fromSing b)+ toSing (Foo b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing a)) (toSing b :: SomeSing b)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing ((SFoo c) c) }+ instance (SingI n, SingI n) => SingI (Foo (n :: a) (n :: b)) where+ sing = (SFoo sing) sing
− tests/compile-and-dump/Singletons/LambdasComprehensive.ghc80.template
@@ -1,81 +0,0 @@-Singletons/LambdasComprehensive.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| foo :: [Nat]- foo- = map (\ x -> either_ pred Succ x) [Left Zero, Right (Succ Zero)]- bar :: [Nat]- bar = map (either_ pred Succ) [Left Zero, Right (Succ Zero)] |]- ======>- foo :: [Nat]- foo- = map (\ x -> either_ pred Succ x) [Left Zero, Right (Succ Zero)]- bar :: [Nat]- bar = map (either_ pred Succ) [Left Zero, Right (Succ Zero)]- type family Lambda_0123456789 t where- Lambda_0123456789 x = Apply (Apply (Apply Either_Sym0 PredSym0) SuccSym0) x- type Lambda_0123456789Sym1 t = Lambda_0123456789 t- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type BarSym0 = Bar- type FooSym0 = Foo- type family Bar :: [Nat] where- Bar = Apply (Apply MapSym0 (Apply (Apply Either_Sym0 PredSym0) SuccSym0)) (Apply (Apply (:$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) '[]))- type family Foo :: [Nat] where- Foo = Apply (Apply MapSym0 Lambda_0123456789Sym0) (Apply (Apply (:$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) '[]))- sBar :: Sing (BarSym0 :: [Nat])- sFoo :: Sing (FooSym0 :: [Nat])- sBar- = applySing- (applySing- (singFun2 (Proxy :: Proxy MapSym0) sMap)- (applySing- (applySing- (singFun3 (Proxy :: Proxy Either_Sym0) sEither_)- (singFun1 (Proxy :: Proxy PredSym0) sPred))- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (singFun1 (Proxy :: Proxy LeftSym0) SLeft) SZero))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (singFun1 (Proxy :: Proxy RightSym0) SRight)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero)))- SNil))- sFoo- = applySing- (applySing- (singFun2 (Proxy :: Proxy MapSym0) sMap)- (singFun1- (Proxy :: Proxy Lambda_0123456789Sym0)- (\ sX- -> let- lambda :: forall x. Sing x -> Sing (Apply Lambda_0123456789Sym0 x)- lambda x- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy Either_Sym0) sEither_)- (singFun1 (Proxy :: Proxy PredSym0) sPred))- (singFun1 (Proxy :: Proxy SuccSym0) SSucc))- x- in lambda sX)))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (singFun1 (Proxy :: Proxy LeftSym0) SLeft) SZero))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (singFun1 (Proxy :: Proxy RightSym0) SRight)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero)))- SNil))
+ tests/compile-and-dump/Singletons/LambdasComprehensive.ghc82.template view
@@ -0,0 +1,71 @@+Singletons/LambdasComprehensive.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| foo :: [Nat]+ foo+ = map (\ x -> either_ pred Succ x) [Left Zero, Right (Succ Zero)]+ bar :: [Nat]+ bar = map (either_ pred Succ) [Left Zero, Right (Succ Zero)] |]+ ======>+ foo :: [Nat]+ foo+ = (map (\ x -> ((either_ pred) Succ) x))+ [Left Zero, Right (Succ Zero)]+ bar :: [Nat]+ bar = (map ((either_ pred) Succ)) [Left Zero, Right (Succ Zero)]+ type family Lambda_0123456789876543210 t where+ Lambda_0123456789876543210 x = Apply (Apply (Apply Either_Sym0 PredSym0) SuccSym0) x+ type Lambda_0123456789876543210Sym1 t =+ Lambda_0123456789876543210 t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210 l+ type BarSym0 = Bar+ type FooSym0 = Foo+ type family Bar :: [Nat] where+ = Apply (Apply MapSym0 (Apply (Apply Either_Sym0 PredSym0) SuccSym0)) (Apply (Apply (:$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) '[]))+ type family Foo :: [Nat] where+ = Apply (Apply MapSym0 Lambda_0123456789876543210Sym0) (Apply (Apply (:$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) '[]))+ sBar :: Sing (BarSym0 :: [Nat])+ sFoo :: Sing (FooSym0 :: [Nat])+ sBar+ = (applySing+ ((applySing ((singFun2 @MapSym0) sMap))+ ((applySing+ ((applySing ((singFun3 @Either_Sym0) sEither_))+ ((singFun1 @PredSym0) sPred)))+ ((singFun1 @SuccSym0) SSucc))))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @LeftSym0) SLeft)) SZero)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @RightSym0) SRight))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))+ SNil))+ sFoo+ = (applySing+ ((applySing ((singFun2 @MapSym0) sMap))+ ((singFun1 @Lambda_0123456789876543210Sym0)+ (\ sX+ -> case sX of {+ _ :: Sing x+ -> (applySing+ ((applySing+ ((applySing ((singFun3 @Either_Sym0) sEither_))+ ((singFun1 @PredSym0) sPred)))+ ((singFun1 @SuccSym0) SSucc)))+ sX }))))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @LeftSym0) SLeft)) SZero)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @RightSym0) SRight))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))+ SNil))
− tests/compile-and-dump/Singletons/LetStatements.ghc80.template
@@ -1,1032 +0,0 @@-Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| foo1 :: Nat -> Nat- foo1 x- = let- y :: Nat- y = Succ Zero- in y- foo2 :: Nat- foo2- = let- y = Succ Zero- z = Succ y- in z- foo3 :: Nat -> Nat- foo3 x- = let- y :: Nat- y = Succ x- in y- foo4 :: Nat -> Nat- foo4 x- = let- f :: Nat -> Nat- f y = Succ y- in f x- foo5 :: Nat -> Nat- foo5 x- = let- f :: Nat -> Nat- f y- = let- z :: Nat- z = Succ y- in Succ z- in f x- foo6 :: Nat -> Nat- foo6 x- = let- f :: Nat -> Nat- f y = Succ y in- let- z :: Nat- z = f x- in z- foo7 :: Nat -> Nat- foo7 x- = let- x :: Nat- x = Zero- in x- foo8 :: Nat -> Nat- foo8 x- = let- z :: Nat- z = (\ x -> x) Zero- in z- foo9 :: Nat -> Nat- foo9 x- = let- z :: Nat -> Nat- z = (\ x -> x)- in z x- foo10 :: Nat -> Nat- foo10 x- = let- (+) :: Nat -> Nat -> Nat- Zero + m = m- (Succ n) + m = Succ (n + m)- in (Succ Zero) + x- foo11 :: Nat -> Nat- foo11 x- = let- (+) :: Nat -> Nat -> Nat- Zero + m = m- (Succ n) + m = Succ (n + m)- z :: Nat- z = x- in (Succ Zero) + z- foo12 :: Nat -> Nat- foo12 x- = let- (+) :: Nat -> Nat -> Nat- Zero + m = m- (Succ n) + m = Succ (n + x)- in x + (Succ (Succ Zero))- foo13 :: forall a. a -> a- foo13 x- = let- bar :: a- bar = x- in foo13_ bar- foo13_ :: a -> a- foo13_ y = y- foo14 :: Nat -> (Nat, Nat)- foo14 x = let (y, z) = (Succ x, x) in (z, y) |]- ======>- foo1 :: Nat -> Nat- foo1 x- = let- y :: Nat- y = Succ Zero- in y- foo2 :: Nat- foo2- = let- y = Succ Zero- z = Succ y- in z- foo3 :: Nat -> Nat- foo3 x- = let- y :: Nat- y = Succ x- in y- foo4 :: Nat -> Nat- foo4 x- = let- f :: Nat -> Nat- f y = Succ y- in f x- foo5 :: Nat -> Nat- foo5 x- = let- f :: Nat -> Nat- f y- = let- z :: Nat- z = Succ y- in Succ z- in f x- foo6 :: Nat -> Nat- foo6 x- = let- f :: Nat -> Nat- f y = Succ y in- let- z :: Nat- z = f x- in z- foo7 :: Nat -> Nat- foo7 x- = let- x :: Nat- x = Zero- in x- foo8 :: Nat -> Nat- foo8 x- = let- z :: Nat- z = (\ x -> x) Zero- in z- foo9 :: Nat -> Nat- foo9 x- = let- z :: Nat -> Nat- z = \ x -> x- in z x- foo10 :: Nat -> Nat- foo10 x- = let- (+) :: Nat -> Nat -> Nat- (+) Zero m = m- (+) (Succ n) m = Succ (n + m)- in ((Succ Zero) + x)- foo11 :: Nat -> Nat- foo11 x- = let- (+) :: Nat -> Nat -> Nat- z :: Nat- (+) Zero m = m- (+) (Succ n) m = Succ (n + m)- z = x- in ((Succ Zero) + z)- foo12 :: Nat -> Nat- foo12 x- = let- (+) :: Nat -> Nat -> Nat- (+) Zero m = m- (+) (Succ n) m = Succ (n + x)- in (x + (Succ (Succ Zero)))- foo13 :: forall a. a -> a- foo13 x- = let- bar :: a- bar = x- in foo13_ bar- foo13_ :: forall a. a -> a- foo13_ y = y- foo14 :: Nat -> (Nat, Nat)- foo14 x = let (y, z) = (Succ x, x) in (z, y)- type family Case_0123456789 x t where- Case_0123456789 x '(y_0123456789, _z_0123456789) = y_0123456789- type family Case_0123456789 x t where- Case_0123456789 x '(_z_0123456789, y_0123456789) = y_0123456789- type Let0123456789YSym1 t = Let0123456789Y t- instance SuppressUnusedWarnings Let0123456789YSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789YSym0KindInference GHC.Tuple.())- data Let0123456789YSym0 l- = forall arg. KindOf (Apply Let0123456789YSym0 arg) ~ KindOf (Let0123456789YSym1 arg) =>- Let0123456789YSym0KindInference- type instance Apply Let0123456789YSym0 l = Let0123456789YSym1 l- type Let0123456789ZSym1 t = Let0123456789Z t- instance SuppressUnusedWarnings Let0123456789ZSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789ZSym0KindInference GHC.Tuple.())- data Let0123456789ZSym0 l- = forall arg. KindOf (Apply Let0123456789ZSym0 arg) ~ KindOf (Let0123456789ZSym1 arg) =>- Let0123456789ZSym0KindInference- type instance Apply Let0123456789ZSym0 l = Let0123456789ZSym1 l- type Let0123456789X_0123456789Sym1 t = Let0123456789X_0123456789 t- instance SuppressUnusedWarnings Let0123456789X_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789X_0123456789Sym0KindInference GHC.Tuple.())- data Let0123456789X_0123456789Sym0 l- = forall arg. KindOf (Apply Let0123456789X_0123456789Sym0 arg) ~ KindOf (Let0123456789X_0123456789Sym1 arg) =>- Let0123456789X_0123456789Sym0KindInference- type instance Apply Let0123456789X_0123456789Sym0 l = Let0123456789X_0123456789Sym1 l- type family Let0123456789Y x where- Let0123456789Y x = Case_0123456789 x (Let0123456789X_0123456789Sym1 x)- type family Let0123456789Z x where- Let0123456789Z x = Case_0123456789 x (Let0123456789X_0123456789Sym1 x)- type family Let0123456789X_0123456789 x where- Let0123456789X_0123456789 x = Apply (Apply Tuple2Sym0 (Apply SuccSym0 x)) x- type Let0123456789BarSym1 t = Let0123456789Bar t- instance SuppressUnusedWarnings Let0123456789BarSym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Let0123456789BarSym0KindInference GHC.Tuple.())- data Let0123456789BarSym0 l- = forall arg. KindOf (Apply Let0123456789BarSym0 arg) ~ KindOf (Let0123456789BarSym1 arg) =>- Let0123456789BarSym0KindInference- type instance Apply Let0123456789BarSym0 l = Let0123456789BarSym1 l- type family Let0123456789Bar x :: a where- Let0123456789Bar x = x- type (:<<<%%%%%%%%%%:+$$$$) t (t :: Nat) (t :: Nat) =- (:<<<%%%%%%%%%%:+) t t t- instance SuppressUnusedWarnings (:<<<%%%%%%%%%%:+$$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<<<%%%%%%%%%%:+$$$###) GHC.Tuple.())- data (:<<<%%%%%%%%%%:+$$$) l (l :: Nat) (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply ((:<<<%%%%%%%%%%:+$$$) l l) arg) ~ KindOf ((:<<<%%%%%%%%%%:+$$$$) l l arg) =>- (:<<<%%%%%%%%%%:+$$$###)- type instance Apply ((:<<<%%%%%%%%%%:+$$$) l l) l = (:<<<%%%%%%%%%%:+$$$$) l l l- instance SuppressUnusedWarnings (:<<<%%%%%%%%%%:+$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<<<%%%%%%%%%%:+$$###) GHC.Tuple.())- data (:<<<%%%%%%%%%%:+$$) l- (l :: TyFun Nat (TyFun Nat Nat -> GHC.Types.Type))- = forall arg. KindOf (Apply ((:<<<%%%%%%%%%%:+$$) l) arg) ~ KindOf ((:<<<%%%%%%%%%%:+$$$) l arg) =>- (:<<<%%%%%%%%%%:+$$###)- type instance Apply ((:<<<%%%%%%%%%%:+$$) l) l = (:<<<%%%%%%%%%%:+$$$) l l- instance SuppressUnusedWarnings (:<<<%%%%%%%%%%:+$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<<<%%%%%%%%%%:+$###) GHC.Tuple.())- data (:<<<%%%%%%%%%%:+$) l- = forall arg. KindOf (Apply (:<<<%%%%%%%%%%:+$) arg) ~ KindOf ((:<<<%%%%%%%%%%:+$$) arg) =>- (:<<<%%%%%%%%%%:+$###)- type instance Apply (:<<<%%%%%%%%%%:+$) l = (:<<<%%%%%%%%%%:+$$) l- type family (:<<<%%%%%%%%%%:+) x (a :: Nat) (a :: Nat) :: Nat where- (:<<<%%%%%%%%%%:+) x Zero m = m- (:<<<%%%%%%%%%%:+) x (Succ n) m = Apply SuccSym0 (Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) n) x)- type Let0123456789ZSym1 t = Let0123456789Z t- instance SuppressUnusedWarnings Let0123456789ZSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789ZSym0KindInference GHC.Tuple.())- data Let0123456789ZSym0 l- = forall arg. KindOf (Apply Let0123456789ZSym0 arg) ~ KindOf (Let0123456789ZSym1 arg) =>- Let0123456789ZSym0KindInference- type instance Apply Let0123456789ZSym0 l = Let0123456789ZSym1 l- type (:<<<%%%%%%%%%%:+$$$$) t (t :: Nat) (t :: Nat) =- (:<<<%%%%%%%%%%:+) t t t- instance SuppressUnusedWarnings (:<<<%%%%%%%%%%:+$$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<<<%%%%%%%%%%:+$$$###) GHC.Tuple.())- data (:<<<%%%%%%%%%%:+$$$) l (l :: Nat) (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply ((:<<<%%%%%%%%%%:+$$$) l l) arg) ~ KindOf ((:<<<%%%%%%%%%%:+$$$$) l l arg) =>- (:<<<%%%%%%%%%%:+$$$###)- type instance Apply ((:<<<%%%%%%%%%%:+$$$) l l) l = (:<<<%%%%%%%%%%:+$$$$) l l l- instance SuppressUnusedWarnings (:<<<%%%%%%%%%%:+$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<<<%%%%%%%%%%:+$$###) GHC.Tuple.())- data (:<<<%%%%%%%%%%:+$$) l- (l :: TyFun Nat (TyFun Nat Nat -> GHC.Types.Type))- = forall arg. KindOf (Apply ((:<<<%%%%%%%%%%:+$$) l) arg) ~ KindOf ((:<<<%%%%%%%%%%:+$$$) l arg) =>- (:<<<%%%%%%%%%%:+$$###)- type instance Apply ((:<<<%%%%%%%%%%:+$$) l) l = (:<<<%%%%%%%%%%:+$$$) l l- instance SuppressUnusedWarnings (:<<<%%%%%%%%%%:+$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<<<%%%%%%%%%%:+$###) GHC.Tuple.())- data (:<<<%%%%%%%%%%:+$) l- = forall arg. KindOf (Apply (:<<<%%%%%%%%%%:+$) arg) ~ KindOf ((:<<<%%%%%%%%%%:+$$) arg) =>- (:<<<%%%%%%%%%%:+$###)- type instance Apply (:<<<%%%%%%%%%%:+$) l = (:<<<%%%%%%%%%%:+$$) l- type family Let0123456789Z x :: Nat where- Let0123456789Z x = x- type family (:<<<%%%%%%%%%%:+) x (a :: Nat) (a :: Nat) :: Nat where- (:<<<%%%%%%%%%%:+) x Zero m = m- (:<<<%%%%%%%%%%:+) x (Succ n) m = Apply SuccSym0 (Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) n) m)- type (:<<<%%%%%%%%%%:+$$$$) t (t :: Nat) (t :: Nat) =- (:<<<%%%%%%%%%%:+) t t t- instance SuppressUnusedWarnings (:<<<%%%%%%%%%%:+$$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<<<%%%%%%%%%%:+$$$###) GHC.Tuple.())- data (:<<<%%%%%%%%%%:+$$$) l (l :: Nat) (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply ((:<<<%%%%%%%%%%:+$$$) l l) arg) ~ KindOf ((:<<<%%%%%%%%%%:+$$$$) l l arg) =>- (:<<<%%%%%%%%%%:+$$$###)- type instance Apply ((:<<<%%%%%%%%%%:+$$$) l l) l = (:<<<%%%%%%%%%%:+$$$$) l l l- instance SuppressUnusedWarnings (:<<<%%%%%%%%%%:+$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<<<%%%%%%%%%%:+$$###) GHC.Tuple.())- data (:<<<%%%%%%%%%%:+$$) l- (l :: TyFun Nat (TyFun Nat Nat -> GHC.Types.Type))- = forall arg. KindOf (Apply ((:<<<%%%%%%%%%%:+$$) l) arg) ~ KindOf ((:<<<%%%%%%%%%%:+$$$) l arg) =>- (:<<<%%%%%%%%%%:+$$###)- type instance Apply ((:<<<%%%%%%%%%%:+$$) l) l = (:<<<%%%%%%%%%%:+$$$) l l- instance SuppressUnusedWarnings (:<<<%%%%%%%%%%:+$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:<<<%%%%%%%%%%:+$###) GHC.Tuple.())- data (:<<<%%%%%%%%%%:+$) l- = forall arg. KindOf (Apply (:<<<%%%%%%%%%%:+$) arg) ~ KindOf ((:<<<%%%%%%%%%%:+$$) arg) =>- (:<<<%%%%%%%%%%:+$###)- type instance Apply (:<<<%%%%%%%%%%:+$) l = (:<<<%%%%%%%%%%:+$$) l- 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_0123456789 x a_0123456789 t where- Lambda_0123456789 x a_0123456789 x = x- type Lambda_0123456789Sym3 t t t = Lambda_0123456789 t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type Let0123456789ZSym2 t (t :: Nat) = Let0123456789Z t t- instance SuppressUnusedWarnings Let0123456789ZSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789ZSym1KindInference GHC.Tuple.())- data Let0123456789ZSym1 l (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply (Let0123456789ZSym1 l) arg) ~ KindOf (Let0123456789ZSym2 l arg) =>- Let0123456789ZSym1KindInference- type instance Apply (Let0123456789ZSym1 l) l = Let0123456789ZSym2 l l- instance SuppressUnusedWarnings Let0123456789ZSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789ZSym0KindInference GHC.Tuple.())- data Let0123456789ZSym0 l- = forall arg. KindOf (Apply Let0123456789ZSym0 arg) ~ KindOf (Let0123456789ZSym1 arg) =>- Let0123456789ZSym0KindInference- type instance Apply Let0123456789ZSym0 l = Let0123456789ZSym1 l- type family Let0123456789Z x (a :: Nat) :: Nat where- Let0123456789Z x a_0123456789 = Apply (Apply (Apply Lambda_0123456789Sym0 x) a_0123456789) a_0123456789- type family Lambda_0123456789 x t where- Lambda_0123456789 x x = x- type Lambda_0123456789Sym2 t t = Lambda_0123456789 t t- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type Let0123456789ZSym1 t = Let0123456789Z t- instance SuppressUnusedWarnings Let0123456789ZSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789ZSym0KindInference GHC.Tuple.())- data Let0123456789ZSym0 l- = forall arg. KindOf (Apply Let0123456789ZSym0 arg) ~ KindOf (Let0123456789ZSym1 arg) =>- Let0123456789ZSym0KindInference- type instance Apply Let0123456789ZSym0 l = Let0123456789ZSym1 l- type family Let0123456789Z x :: Nat where- Let0123456789Z x = Apply (Apply Lambda_0123456789Sym0 x) ZeroSym0- type Let0123456789XSym1 t = Let0123456789X t- instance SuppressUnusedWarnings Let0123456789XSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789XSym0KindInference GHC.Tuple.())- data Let0123456789XSym0 l- = forall arg. KindOf (Apply Let0123456789XSym0 arg) ~ KindOf (Let0123456789XSym1 arg) =>- Let0123456789XSym0KindInference- type instance Apply Let0123456789XSym0 l = Let0123456789XSym1 l- type family Let0123456789X x :: Nat where- Let0123456789X x = ZeroSym0- type Let0123456789FSym2 t (t :: Nat) = Let0123456789F t t- instance SuppressUnusedWarnings Let0123456789FSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789FSym1KindInference GHC.Tuple.())- data Let0123456789FSym1 l (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply (Let0123456789FSym1 l) arg) ~ KindOf (Let0123456789FSym2 l arg) =>- Let0123456789FSym1KindInference- type instance Apply (Let0123456789FSym1 l) l = Let0123456789FSym2 l l- instance SuppressUnusedWarnings Let0123456789FSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789FSym0KindInference GHC.Tuple.())- data Let0123456789FSym0 l- = forall arg. KindOf (Apply Let0123456789FSym0 arg) ~ KindOf (Let0123456789FSym1 arg) =>- Let0123456789FSym0KindInference- type instance Apply Let0123456789FSym0 l = Let0123456789FSym1 l- type family Let0123456789F x (a :: Nat) :: Nat where- Let0123456789F x y = Apply SuccSym0 y- type Let0123456789ZSym1 t = Let0123456789Z t- instance SuppressUnusedWarnings Let0123456789ZSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789ZSym0KindInference GHC.Tuple.())- data Let0123456789ZSym0 l- = forall arg. KindOf (Apply Let0123456789ZSym0 arg) ~ KindOf (Let0123456789ZSym1 arg) =>- Let0123456789ZSym0KindInference- type instance Apply Let0123456789ZSym0 l = Let0123456789ZSym1 l- type family Let0123456789Z x :: Nat where- Let0123456789Z x = Apply (Let0123456789FSym1 x) x- type Let0123456789ZSym2 t t = Let0123456789Z t t- instance SuppressUnusedWarnings Let0123456789ZSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789ZSym1KindInference GHC.Tuple.())- data Let0123456789ZSym1 l l- = forall arg. KindOf (Apply (Let0123456789ZSym1 l) arg) ~ KindOf (Let0123456789ZSym2 l arg) =>- Let0123456789ZSym1KindInference- type instance Apply (Let0123456789ZSym1 l) l = Let0123456789ZSym2 l l- instance SuppressUnusedWarnings Let0123456789ZSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789ZSym0KindInference GHC.Tuple.())- data Let0123456789ZSym0 l- = forall arg. KindOf (Apply Let0123456789ZSym0 arg) ~ KindOf (Let0123456789ZSym1 arg) =>- Let0123456789ZSym0KindInference- type instance Apply Let0123456789ZSym0 l = Let0123456789ZSym1 l- type family Let0123456789Z x y :: Nat where- Let0123456789Z x y = Apply SuccSym0 y- type Let0123456789FSym2 t (t :: Nat) = Let0123456789F t t- instance SuppressUnusedWarnings Let0123456789FSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789FSym1KindInference GHC.Tuple.())- data Let0123456789FSym1 l (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply (Let0123456789FSym1 l) arg) ~ KindOf (Let0123456789FSym2 l arg) =>- Let0123456789FSym1KindInference- type instance Apply (Let0123456789FSym1 l) l = Let0123456789FSym2 l l- instance SuppressUnusedWarnings Let0123456789FSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789FSym0KindInference GHC.Tuple.())- data Let0123456789FSym0 l- = forall arg. KindOf (Apply Let0123456789FSym0 arg) ~ KindOf (Let0123456789FSym1 arg) =>- Let0123456789FSym0KindInference- type instance Apply Let0123456789FSym0 l = Let0123456789FSym1 l- type family Let0123456789F x (a :: Nat) :: Nat where- Let0123456789F x y = Apply SuccSym0 (Let0123456789ZSym2 x y)- type Let0123456789FSym2 t (t :: Nat) = Let0123456789F t t- instance SuppressUnusedWarnings Let0123456789FSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789FSym1KindInference GHC.Tuple.())- data Let0123456789FSym1 l (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply (Let0123456789FSym1 l) arg) ~ KindOf (Let0123456789FSym2 l arg) =>- Let0123456789FSym1KindInference- type instance Apply (Let0123456789FSym1 l) l = Let0123456789FSym2 l l- instance SuppressUnusedWarnings Let0123456789FSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789FSym0KindInference GHC.Tuple.())- data Let0123456789FSym0 l- = forall arg. KindOf (Apply Let0123456789FSym0 arg) ~ KindOf (Let0123456789FSym1 arg) =>- Let0123456789FSym0KindInference- type instance Apply Let0123456789FSym0 l = Let0123456789FSym1 l- type family Let0123456789F x (a :: Nat) :: Nat where- Let0123456789F x y = Apply SuccSym0 y- type Let0123456789YSym1 t = Let0123456789Y t- instance SuppressUnusedWarnings Let0123456789YSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789YSym0KindInference GHC.Tuple.())- data Let0123456789YSym0 l- = forall arg. KindOf (Apply Let0123456789YSym0 arg) ~ KindOf (Let0123456789YSym1 arg) =>- Let0123456789YSym0KindInference- type instance Apply Let0123456789YSym0 l = Let0123456789YSym1 l- type family Let0123456789Y x :: Nat where- Let0123456789Y x = Apply SuccSym0 x- type Let0123456789YSym0 = Let0123456789Y- type Let0123456789ZSym0 = Let0123456789Z- type family Let0123456789Y where- Let0123456789Y = Apply SuccSym0 ZeroSym0- type family Let0123456789Z where- Let0123456789Z = Apply SuccSym0 Let0123456789YSym0- type Let0123456789YSym1 t = Let0123456789Y t- instance SuppressUnusedWarnings Let0123456789YSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789YSym0KindInference GHC.Tuple.())- data Let0123456789YSym0 l- = forall arg. KindOf (Apply Let0123456789YSym0 arg) ~ KindOf (Let0123456789YSym1 arg) =>- Let0123456789YSym0KindInference- type instance Apply Let0123456789YSym0 l = Let0123456789YSym1 l- type family Let0123456789Y x :: Nat where- Let0123456789Y x = Apply SuccSym0 ZeroSym0- type Foo14Sym1 (t :: Nat) = Foo14 t- instance SuppressUnusedWarnings Foo14Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo14Sym0KindInference GHC.Tuple.())- data Foo14Sym0 (l :: TyFun Nat (Nat, Nat))- = forall arg. KindOf (Apply Foo14Sym0 arg) ~ KindOf (Foo14Sym1 arg) =>- Foo14Sym0KindInference- type instance Apply Foo14Sym0 l = Foo14Sym1 l- type Foo13_Sym1 (t :: a0123456789) = Foo13_ t- instance SuppressUnusedWarnings Foo13_Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo13_Sym0KindInference GHC.Tuple.())- data Foo13_Sym0 (l :: TyFun a0123456789 a0123456789)- = forall arg. KindOf (Apply Foo13_Sym0 arg) ~ KindOf (Foo13_Sym1 arg) =>- Foo13_Sym0KindInference- type instance Apply Foo13_Sym0 l = Foo13_Sym1 l- type Foo13Sym1 (t :: a0123456789) = Foo13 t- instance SuppressUnusedWarnings Foo13Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo13Sym0KindInference GHC.Tuple.())- data Foo13Sym0 (l :: TyFun a0123456789 a0123456789)- = forall arg. KindOf (Apply Foo13Sym0 arg) ~ KindOf (Foo13Sym1 arg) =>- Foo13Sym0KindInference- type instance Apply Foo13Sym0 l = Foo13Sym1 l- type Foo12Sym1 (t :: Nat) = Foo12 t- instance SuppressUnusedWarnings Foo12Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo12Sym0KindInference GHC.Tuple.())- data Foo12Sym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply Foo12Sym0 arg) ~ KindOf (Foo12Sym1 arg) =>- Foo12Sym0KindInference- type instance Apply Foo12Sym0 l = Foo12Sym1 l- type Foo11Sym1 (t :: Nat) = Foo11 t- instance SuppressUnusedWarnings Foo11Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo11Sym0KindInference GHC.Tuple.())- data Foo11Sym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply Foo11Sym0 arg) ~ KindOf (Foo11Sym1 arg) =>- Foo11Sym0KindInference- type instance Apply Foo11Sym0 l = Foo11Sym1 l- type Foo10Sym1 (t :: Nat) = Foo10 t- instance SuppressUnusedWarnings Foo10Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo10Sym0KindInference GHC.Tuple.())- data Foo10Sym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply Foo10Sym0 arg) ~ KindOf (Foo10Sym1 arg) =>- Foo10Sym0KindInference- type instance Apply Foo10Sym0 l = Foo10Sym1 l- type Foo9Sym1 (t :: Nat) = Foo9 t- instance SuppressUnusedWarnings Foo9Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo9Sym0KindInference GHC.Tuple.())- data Foo9Sym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply Foo9Sym0 arg) ~ KindOf (Foo9Sym1 arg) =>- Foo9Sym0KindInference- type instance Apply Foo9Sym0 l = Foo9Sym1 l- type Foo8Sym1 (t :: Nat) = Foo8 t- instance SuppressUnusedWarnings Foo8Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo8Sym0KindInference GHC.Tuple.())- data Foo8Sym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply Foo8Sym0 arg) ~ KindOf (Foo8Sym1 arg) =>- Foo8Sym0KindInference- type instance Apply Foo8Sym0 l = Foo8Sym1 l- type Foo7Sym1 (t :: Nat) = Foo7 t- instance SuppressUnusedWarnings Foo7Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo7Sym0KindInference GHC.Tuple.())- data Foo7Sym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply Foo7Sym0 arg) ~ KindOf (Foo7Sym1 arg) =>- Foo7Sym0KindInference- type instance Apply Foo7Sym0 l = Foo7Sym1 l- type Foo6Sym1 (t :: Nat) = Foo6 t- instance SuppressUnusedWarnings Foo6Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo6Sym0KindInference GHC.Tuple.())- data Foo6Sym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply Foo6Sym0 arg) ~ KindOf (Foo6Sym1 arg) =>- Foo6Sym0KindInference- type instance Apply Foo6Sym0 l = Foo6Sym1 l- type Foo5Sym1 (t :: Nat) = Foo5 t- instance SuppressUnusedWarnings Foo5Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo5Sym0KindInference GHC.Tuple.())- data Foo5Sym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply Foo5Sym0 arg) ~ KindOf (Foo5Sym1 arg) =>- Foo5Sym0KindInference- type instance Apply Foo5Sym0 l = Foo5Sym1 l- type Foo4Sym1 (t :: Nat) = Foo4 t- instance SuppressUnusedWarnings Foo4Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo4Sym0KindInference GHC.Tuple.())- data Foo4Sym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply Foo4Sym0 arg) ~ KindOf (Foo4Sym1 arg) =>- Foo4Sym0KindInference- type instance Apply Foo4Sym0 l = Foo4Sym1 l- type Foo3Sym1 (t :: Nat) = Foo3 t- instance SuppressUnusedWarnings Foo3Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo3Sym0KindInference GHC.Tuple.())- data Foo3Sym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply Foo3Sym0 arg) ~ KindOf (Foo3Sym1 arg) =>- Foo3Sym0KindInference- type instance Apply Foo3Sym0 l = Foo3Sym1 l- type Foo2Sym0 = Foo2- type Foo1Sym1 (t :: Nat) = Foo1 t- instance SuppressUnusedWarnings Foo1Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo1Sym0KindInference GHC.Tuple.())- data Foo1Sym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply Foo1Sym0 arg) ~ KindOf (Foo1Sym1 arg) =>- Foo1Sym0KindInference- type instance Apply Foo1Sym0 l = Foo1Sym1 l- type family Foo14 (a :: Nat) :: (Nat, Nat) where- Foo14 x = Apply (Apply Tuple2Sym0 (Let0123456789ZSym1 x)) (Let0123456789YSym1 x)- type family Foo13_ (a :: a) :: a where- Foo13_ y = y- type family Foo13 (a :: a) :: a where- Foo13 x = Apply Foo13_Sym0 (Let0123456789BarSym1 x)- type family Foo12 (a :: Nat) :: Nat where- Foo12 x = Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) x) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))- type family Foo11 (a :: Nat) :: Nat where- Foo11 x = Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) (Apply SuccSym0 ZeroSym0)) (Let0123456789ZSym1 x)- type family Foo10 (a :: Nat) :: Nat where- Foo10 x = Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) (Apply SuccSym0 ZeroSym0)) x- type family Foo9 (a :: Nat) :: Nat where- Foo9 x = Apply (Let0123456789ZSym1 x) x- type family Foo8 (a :: Nat) :: Nat where- Foo8 x = Let0123456789ZSym1 x- type family Foo7 (a :: Nat) :: Nat where- Foo7 x = Let0123456789XSym1 x- type family Foo6 (a :: Nat) :: Nat where- Foo6 x = Let0123456789ZSym1 x- type family Foo5 (a :: Nat) :: Nat where- Foo5 x = Apply (Let0123456789FSym1 x) x- type family Foo4 (a :: Nat) :: Nat where- Foo4 x = Apply (Let0123456789FSym1 x) x- type family Foo3 (a :: Nat) :: Nat where- Foo3 x = Let0123456789YSym1 x- type family Foo2 :: Nat where- Foo2 = Let0123456789ZSym0- type family Foo1 (a :: Nat) :: Nat where- Foo1 x = Let0123456789YSym1 x- sFoo14 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo14Sym0 t :: (Nat, Nat))- sFoo13_ ::- forall (t :: a). Sing t -> Sing (Apply Foo13_Sym0 t :: a)- sFoo13 :: forall (t :: a). Sing t -> Sing (Apply Foo13Sym0 t :: a)- sFoo12 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo12Sym0 t :: Nat)- sFoo11 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo11Sym0 t :: Nat)- sFoo10 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo10Sym0 t :: Nat)- sFoo9 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo9Sym0 t :: Nat)- sFoo8 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo8Sym0 t :: Nat)- sFoo7 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo7Sym0 t :: Nat)- sFoo6 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo6Sym0 t :: Nat)- sFoo5 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo5Sym0 t :: Nat)- sFoo4 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo4Sym0 t :: Nat)- sFoo3 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo3Sym0 t :: Nat)- sFoo2 :: Sing (Foo2Sym0 :: Nat)- sFoo1 ::- forall (t :: Nat). Sing t -> Sing (Apply Foo1Sym0 t :: Nat)- sFoo14 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo14Sym0 t :: (Nat, Nat))- lambda x- = let- sY :: Sing (Let0123456789YSym1 x)- sZ :: Sing (Let0123456789ZSym1 x)- sX_0123456789 :: Sing (Let0123456789X_0123456789Sym1 x)- sY- = case sX_0123456789 of {- STuple2 sY_0123456789 _s_z_0123456789- -> let- lambda ::- forall y_0123456789 _z_0123456789.- Apply (Apply Tuple2Sym0 y_0123456789) _z_0123456789 ~ Let0123456789X_0123456789Sym1 x =>- Sing y_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 x (Apply (Apply Tuple2Sym0 y_0123456789) _z_0123456789))- lambda y_0123456789 _z_0123456789 = y_0123456789- in lambda sY_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 x (Let0123456789X_0123456789Sym1 x))- sZ- = case sX_0123456789 of {- STuple2 _s_z_0123456789 sY_0123456789- -> let- lambda ::- forall _z_0123456789 y_0123456789.- Apply (Apply Tuple2Sym0 _z_0123456789) y_0123456789 ~ Let0123456789X_0123456789Sym1 x =>- Sing _z_0123456789- -> Sing y_0123456789- -> Sing (Case_0123456789 x (Apply (Apply Tuple2Sym0 _z_0123456789) y_0123456789))- lambda _z_0123456789 y_0123456789 = y_0123456789- in lambda _s_z_0123456789 sY_0123456789 } ::- Sing (Case_0123456789 x (Let0123456789X_0123456789Sym1 x))- sX_0123456789- = applySing- (applySing- (singFun2 (Proxy :: Proxy Tuple2Sym0) STuple2)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) x))- x- in- applySing- (applySing (singFun2 (Proxy :: Proxy Tuple2Sym0) STuple2) sZ) sY- in lambda sX- sFoo13_ sY- = let- lambda ::- forall y. t ~ y => Sing y -> Sing (Apply Foo13_Sym0 t :: a)- lambda y = y- in lambda sY- sFoo13 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo13Sym0 t :: a)- lambda x- = let- sBar :: Sing (Let0123456789BarSym1 x :: a)- sBar = x- in applySing (singFun1 (Proxy :: Proxy Foo13_Sym0) sFoo13_) sBar- in lambda sX- sFoo12 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo12Sym0 t :: Nat)- lambda x- = let- (%:+) ::- forall (t :: Nat) (t :: Nat).- Sing t- -> Sing t- -> Sing (Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) t) t :: Nat)- (%:+) SZero sM- = let- lambda ::- forall m.- (t ~ ZeroSym0, t ~ m) =>- Sing m -> Sing (Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) t) t :: Nat)- lambda m = m- in lambda sM- (%:+) (SSucc sN) sM- = let- lambda ::- forall n m.- (t ~ Apply SuccSym0 n, t ~ m) =>- Sing n- -> Sing m- -> Sing (Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) t) t :: Nat)- lambda n m- = applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)- (applySing- (applySing- (singFun2 (Proxy :: Proxy ((:<<<%%%%%%%%%%:+$$) x)) (%:+)) n)- x)- in lambda sN sM- in- applySing- (applySing- (singFun2 (Proxy :: Proxy ((:<<<%%%%%%%%%%:+$$) x)) (%:+)) x)- (applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- in lambda sX- sFoo11 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo11Sym0 t :: Nat)- lambda x- = let- sZ :: Sing (Let0123456789ZSym1 x :: Nat)- (%:+) ::- forall (t :: Nat) (t :: Nat).- Sing t- -> Sing t- -> Sing (Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) t) t :: Nat)- sZ = x- (%:+) SZero sM- = let- lambda ::- forall m.- (t ~ ZeroSym0, t ~ m) =>- Sing m -> Sing (Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) t) t :: Nat)- lambda m = m- in lambda sM- (%:+) (SSucc sN) sM- = let- lambda ::- forall n m.- (t ~ Apply SuccSym0 n, t ~ m) =>- Sing n- -> Sing m- -> Sing (Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) t) t :: Nat)- lambda n m- = applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)- (applySing- (applySing- (singFun2 (Proxy :: Proxy ((:<<<%%%%%%%%%%:+$$) x)) (%:+)) n)- m)- in lambda sN sM- in- applySing- (applySing- (singFun2 (Proxy :: Proxy ((:<<<%%%%%%%%%%:+$$) x)) (%:+))- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- sZ- in lambda sX- sFoo10 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo10Sym0 t :: Nat)- lambda x- = let- (%:+) ::- forall (t :: Nat) (t :: Nat).- Sing t- -> Sing t- -> Sing (Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) t) t :: Nat)- (%:+) SZero sM- = let- lambda ::- forall m.- (t ~ ZeroSym0, t ~ m) =>- Sing m -> Sing (Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) t) t :: Nat)- lambda m = m- in lambda sM- (%:+) (SSucc sN) sM- = let- lambda ::- forall n m.- (t ~ Apply SuccSym0 n, t ~ m) =>- Sing n- -> Sing m- -> Sing (Apply (Apply ((:<<<%%%%%%%%%%:+$$) x) t) t :: Nat)- lambda n m- = applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)- (applySing- (applySing- (singFun2 (Proxy :: Proxy ((:<<<%%%%%%%%%%:+$$) x)) (%:+)) n)- m)- in lambda sN sM- in- applySing- (applySing- (singFun2 (Proxy :: Proxy ((:<<<%%%%%%%%%%:+$$) x)) (%:+))- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- x- in lambda sX- sFoo9 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo9Sym0 t :: Nat)- lambda x- = let- sZ ::- forall (t :: Nat).- Sing t -> Sing (Apply (Let0123456789ZSym1 x) t :: Nat)- sZ sA_0123456789- = let- lambda ::- forall a_0123456789.- t ~ a_0123456789 =>- Sing a_0123456789 -> Sing (Apply (Let0123456789ZSym1 x) t :: Nat)- lambda a_0123456789- = applySing- (singFun1- (Proxy ::- Proxy (Apply (Apply Lambda_0123456789Sym0 x) a_0123456789))- (\ sX- -> let- lambda ::- forall x.- Sing x- -> Sing (Apply (Apply (Apply Lambda_0123456789Sym0 x) a_0123456789) x)- lambda x = x- in lambda sX))- a_0123456789- in lambda sA_0123456789- in- applySing (singFun1 (Proxy :: Proxy (Let0123456789ZSym1 x)) sZ) x- in lambda sX- sFoo8 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo8Sym0 t :: Nat)- lambda x- = let- sZ :: Sing (Let0123456789ZSym1 x :: Nat)- sZ- = applySing- (singFun1- (Proxy :: Proxy (Apply Lambda_0123456789Sym0 x))- (\ sX- -> let- lambda ::- forall x.- Sing x -> Sing (Apply (Apply Lambda_0123456789Sym0 x) x)- lambda x = x- in lambda sX))- SZero- in sZ- in lambda sX- sFoo7 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo7Sym0 t :: Nat)- lambda x- = let- sX :: Sing (Let0123456789XSym1 x :: Nat)- sX = SZero- in sX- in lambda sX- sFoo6 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo6Sym0 t :: Nat)- lambda x- = let- sF ::- forall (t :: Nat).- Sing t -> Sing (Apply (Let0123456789FSym1 x) t :: Nat)- sF sY- = let- lambda ::- forall y.- t ~ y => Sing y -> Sing (Apply (Let0123456789FSym1 x) t :: Nat)- lambda y = applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) y- in lambda sY in- let- sZ :: Sing (Let0123456789ZSym1 x :: Nat)- sZ- = applySing (singFun1 (Proxy :: Proxy (Let0123456789FSym1 x)) sF) x- in sZ- in lambda sX- sFoo5 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo5Sym0 t :: Nat)- lambda x- = let- sF ::- forall (t :: Nat).- Sing t -> Sing (Apply (Let0123456789FSym1 x) t :: Nat)- sF sY- = let- lambda ::- forall y.- t ~ y => Sing y -> Sing (Apply (Let0123456789FSym1 x) t :: Nat)- lambda y- = let- sZ :: Sing (Let0123456789ZSym2 x y :: Nat)- sZ = applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) y- in applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) sZ- in lambda sY- in- applySing (singFun1 (Proxy :: Proxy (Let0123456789FSym1 x)) sF) x- in lambda sX- sFoo4 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo4Sym0 t :: Nat)- lambda x- = let- sF ::- forall (t :: Nat).- Sing t -> Sing (Apply (Let0123456789FSym1 x) t :: Nat)- sF sY- = let- lambda ::- forall y.- t ~ y => Sing y -> Sing (Apply (Let0123456789FSym1 x) t :: Nat)- lambda y = applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) y- in lambda sY- in- applySing (singFun1 (Proxy :: Proxy (Let0123456789FSym1 x)) sF) x- in lambda sX- sFoo3 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo3Sym0 t :: Nat)- lambda x- = let- sY :: Sing (Let0123456789YSym1 x :: Nat)- sY = applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) x- in sY- in lambda sX- sFoo2- = let- sY :: Sing Let0123456789YSym0- sZ :: Sing Let0123456789ZSym0- sY = applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero- sZ = applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) sY- in sZ- sFoo1 sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply Foo1Sym0 t :: Nat)- lambda x- = let- sY :: Sing (Let0123456789YSym1 x :: Nat)- sY = applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero- in sY- in lambda sX
+ tests/compile-and-dump/Singletons/LetStatements.ghc82.template view
@@ -0,0 +1,908 @@+Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| foo1 :: Nat -> Nat+ foo1 x+ = let+ y :: Nat+ y = Succ Zero+ in y+ foo2 :: Nat+ foo2+ = let+ y = Succ Zero+ z = Succ y+ in z+ foo3 :: Nat -> Nat+ foo3 x+ = let+ y :: Nat+ y = Succ x+ in y+ foo4 :: Nat -> Nat+ foo4 x+ = let+ f :: Nat -> Nat+ f y = Succ y+ in f x+ foo5 :: Nat -> Nat+ foo5 x+ = let+ f :: Nat -> Nat+ f y+ = let+ z :: Nat+ z = Succ y+ in Succ z+ in f x+ foo6 :: Nat -> Nat+ foo6 x+ = let+ f :: Nat -> Nat+ f y = Succ y in+ let+ z :: Nat+ z = f x+ in z+ foo7 :: Nat -> Nat+ foo7 x+ = let+ x :: Nat+ x = Zero+ in x+ foo8 :: Nat -> Nat+ foo8 x+ = let+ z :: Nat+ z = (\ x -> x) Zero+ in z+ foo9 :: Nat -> Nat+ foo9 x+ = let+ z :: Nat -> Nat+ z = (\ x -> x)+ in z x+ foo10 :: Nat -> Nat+ foo10 x+ = let+ (+) :: Nat -> Nat -> Nat+ Zero + m = m+ (Succ n) + m = Succ (n + m)+ in (Succ Zero) + x+ foo11 :: Nat -> Nat+ foo11 x+ = let+ (+) :: Nat -> Nat -> Nat+ Zero + m = m+ (Succ n) + m = Succ (n + m)+ z :: Nat+ z = x+ in (Succ Zero) + z+ foo12 :: Nat -> Nat+ foo12 x+ = let+ (+) :: Nat -> Nat -> Nat+ Zero + m = m+ (Succ n) + m = Succ (n + x)+ in x + (Succ (Succ Zero))+ foo13 :: forall a. a -> a+ foo13 x+ = let+ bar :: a+ bar = x+ in foo13_ bar+ foo13_ :: a -> a+ foo13_ y = y+ foo14 :: Nat -> (Nat, Nat)+ foo14 x = let (y, z) = (Succ x, x) in (z, y) |]+ ======>+ foo1 :: Nat -> Nat+ foo1 x+ = let+ y :: Nat+ y = Succ Zero+ in y+ foo2 :: Nat+ foo2+ = let+ y = Succ Zero+ z = Succ y+ in z+ foo3 :: Nat -> Nat+ foo3 x+ = let+ y :: Nat+ y = Succ x+ in y+ foo4 :: Nat -> Nat+ foo4 x+ = let+ f :: Nat -> Nat+ f y = Succ y+ in f x+ foo5 :: Nat -> Nat+ foo5 x+ = let+ f :: Nat -> Nat+ f y+ = let+ z :: Nat+ z = Succ y+ in Succ z+ in f x+ foo6 :: Nat -> Nat+ foo6 x+ = let+ f :: Nat -> Nat+ f y = Succ y in+ let+ z :: Nat+ z = f x+ in z+ foo7 :: Nat -> Nat+ foo7 x+ = let+ x :: Nat+ x = Zero+ in x+ foo8 :: Nat -> Nat+ foo8 x+ = let+ z :: Nat+ z = (\ x -> x) Zero+ in z+ foo9 :: Nat -> Nat+ foo9 x+ = let+ z :: Nat -> Nat+ z = \ x -> x+ in z x+ foo10 :: Nat -> Nat+ foo10 x+ = let+ (+) :: Nat -> Nat -> Nat+ (+) Zero m = m+ (+) (Succ n) m = Succ (n + m)+ in ((Succ Zero) + x)+ foo11 :: Nat -> Nat+ foo11 x+ = let+ (+) :: Nat -> Nat -> Nat+ z :: Nat+ (+) Zero m = m+ (+) (Succ n) m = Succ (n + m)+ z = x+ in ((Succ Zero) + z)+ foo12 :: Nat -> Nat+ foo12 x+ = let+ (+) :: Nat -> Nat -> Nat+ (+) Zero m = m+ (+) (Succ n) m = Succ (n + x)+ in (x + (Succ (Succ Zero)))+ foo13 :: forall a. a -> a+ foo13 x+ = let+ bar :: a+ bar = x+ in foo13_ bar+ foo13_ :: a -> a+ foo13_ y = y+ foo14 :: Nat -> (Nat, Nat)+ foo14 x = let (y, z) = (Succ x, x) in (z, y)+ type family Case_0123456789876543210 x t where+ Case_0123456789876543210 x '(y_0123456789876543210,+ _z_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 x t where+ Case_0123456789876543210 x '(_z_0123456789876543210,+ y_0123456789876543210) = y_0123456789876543210+ type Let0123456789876543210YSym1 t = Let0123456789876543210Y t+ instance SuppressUnusedWarnings Let0123456789876543210YSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210YSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210YSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) =>+ Let0123456789876543210YSym0KindInference+ type instance Apply Let0123456789876543210YSym0 l = Let0123456789876543210Y l+ type Let0123456789876543210ZSym1 t = Let0123456789876543210Z t+ instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210ZSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210ZSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>+ Let0123456789876543210ZSym0KindInference+ type instance Apply Let0123456789876543210ZSym0 l = Let0123456789876543210Z l+ type Let0123456789876543210X_0123456789876543210Sym1 t =+ Let0123456789876543210X_0123456789876543210 t+ instance SuppressUnusedWarnings Let0123456789876543210X_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210X_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210X_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Let0123456789876543210X_0123456789876543210Sym0 arg) (Let0123456789876543210X_0123456789876543210Sym1 arg) =>+ Let0123456789876543210X_0123456789876543210Sym0KindInference+ type instance Apply Let0123456789876543210X_0123456789876543210Sym0 l = Let0123456789876543210X_0123456789876543210 l+ type family Let0123456789876543210Y x where+ Let0123456789876543210Y x = Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x)+ type family Let0123456789876543210Z x where+ Let0123456789876543210Z x = Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x)+ type family Let0123456789876543210X_0123456789876543210 x where+ Let0123456789876543210X_0123456789876543210 x = Apply (Apply Tuple2Sym0 (Apply SuccSym0 x)) x+ type Let0123456789876543210BarSym1 t = Let0123456789876543210Bar t+ instance SuppressUnusedWarnings Let0123456789876543210BarSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210BarSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210BarSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210BarSym0 arg) (Let0123456789876543210BarSym1 arg) =>+ Let0123456789876543210BarSym0KindInference+ type instance Apply Let0123456789876543210BarSym0 l = Let0123456789876543210Bar l+ type family Let0123456789876543210Bar x :: a where+ Let0123456789876543210Bar x = x+ type (:<<<%%%%%%%%%%%%%%%%%%%:+$$$$) t (t :: Nat) (t :: Nat) =+ (:<<<%%%%%%%%%%%%%%%%%%%:+) t t t+ instance SuppressUnusedWarnings (:<<<%%%%%%%%%%%%%%%%%%%:+$$$) where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) (:<<<%%%%%%%%%%%%%%%%%%%:+$$$###)) GHC.Tuple.())+ data (:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l (l :: Nat) (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l l) arg) ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$$) l l arg) =>+ (:<<<%%%%%%%%%%%%%%%%%%%:+$$$###)+ type instance Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l l) l = (:<<<%%%%%%%%%%%%%%%%%%%:+) l l l+ instance SuppressUnusedWarnings (:<<<%%%%%%%%%%%%%%%%%%%:+$$) where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) (:<<<%%%%%%%%%%%%%%%%%%%:+$$###)) GHC.Tuple.())+ data (:<<<%%%%%%%%%%%%%%%%%%%:+$$) l (l :: TyFun Nat (TyFun Nat Nat+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) l) arg) ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l arg) =>+ (:<<<%%%%%%%%%%%%%%%%%%%:+$$###)+ type instance Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) l) l = (:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l l+ instance SuppressUnusedWarnings (:<<<%%%%%%%%%%%%%%%%%%%:+$) where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) (:<<<%%%%%%%%%%%%%%%%%%%:+$###)) GHC.Tuple.())+ data (:<<<%%%%%%%%%%%%%%%%%%%:+$) l+ = forall arg. SameKind (Apply (:<<<%%%%%%%%%%%%%%%%%%%:+$) arg) ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) arg) =>+ (:<<<%%%%%%%%%%%%%%%%%%%:+$###)+ type instance Apply (:<<<%%%%%%%%%%%%%%%%%%%:+$) l = (:<<<%%%%%%%%%%%%%%%%%%%:+$$) l+ type family (:<<<%%%%%%%%%%%%%%%%%%%:+) x (a :: Nat) (a :: Nat) :: Nat where+ (:<<<%%%%%%%%%%%%%%%%%%%:+) x Zero m = m+ (:<<<%%%%%%%%%%%%%%%%%%%:+) x (Succ n) m = Apply SuccSym0 (Apply (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x) n) x)+ type Let0123456789876543210ZSym1 t = Let0123456789876543210Z t+ instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210ZSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210ZSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>+ Let0123456789876543210ZSym0KindInference+ type instance Apply Let0123456789876543210ZSym0 l = Let0123456789876543210Z l+ type (:<<<%%%%%%%%%%%%%%%%%%%:+$$$$) t (t :: Nat) (t :: Nat) =+ (:<<<%%%%%%%%%%%%%%%%%%%:+) t t t+ instance SuppressUnusedWarnings (:<<<%%%%%%%%%%%%%%%%%%%:+$$$) where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) (:<<<%%%%%%%%%%%%%%%%%%%:+$$$###)) GHC.Tuple.())+ data (:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l (l :: Nat) (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l l) arg) ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$$) l l arg) =>+ (:<<<%%%%%%%%%%%%%%%%%%%:+$$$###)+ type instance Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l l) l = (:<<<%%%%%%%%%%%%%%%%%%%:+) l l l+ instance SuppressUnusedWarnings (:<<<%%%%%%%%%%%%%%%%%%%:+$$) where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) (:<<<%%%%%%%%%%%%%%%%%%%:+$$###)) GHC.Tuple.())+ data (:<<<%%%%%%%%%%%%%%%%%%%:+$$) l (l :: TyFun Nat (TyFun Nat Nat+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) l) arg) ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l arg) =>+ (:<<<%%%%%%%%%%%%%%%%%%%:+$$###)+ type instance Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) l) l = (:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l l+ instance SuppressUnusedWarnings (:<<<%%%%%%%%%%%%%%%%%%%:+$) where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) (:<<<%%%%%%%%%%%%%%%%%%%:+$###)) GHC.Tuple.())+ data (:<<<%%%%%%%%%%%%%%%%%%%:+$) l+ = forall arg. SameKind (Apply (:<<<%%%%%%%%%%%%%%%%%%%:+$) arg) ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) arg) =>+ (:<<<%%%%%%%%%%%%%%%%%%%:+$###)+ type instance Apply (:<<<%%%%%%%%%%%%%%%%%%%:+$) l = (:<<<%%%%%%%%%%%%%%%%%%%:+$$) l+ type family Let0123456789876543210Z x :: Nat where+ Let0123456789876543210Z x = x+ type family (:<<<%%%%%%%%%%%%%%%%%%%:+) x (a :: Nat) (a :: Nat) :: Nat where+ (:<<<%%%%%%%%%%%%%%%%%%%:+) x Zero m = m+ (:<<<%%%%%%%%%%%%%%%%%%%:+) x (Succ n) m = Apply SuccSym0 (Apply (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x) n) m)+ type (:<<<%%%%%%%%%%%%%%%%%%%:+$$$$) t (t :: Nat) (t :: Nat) =+ (:<<<%%%%%%%%%%%%%%%%%%%:+) t t t+ instance SuppressUnusedWarnings (:<<<%%%%%%%%%%%%%%%%%%%:+$$$) where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) (:<<<%%%%%%%%%%%%%%%%%%%:+$$$###)) GHC.Tuple.())+ data (:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l (l :: Nat) (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l l) arg) ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$$) l l arg) =>+ (:<<<%%%%%%%%%%%%%%%%%%%:+$$$###)+ type instance Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l l) l = (:<<<%%%%%%%%%%%%%%%%%%%:+) l l l+ instance SuppressUnusedWarnings (:<<<%%%%%%%%%%%%%%%%%%%:+$$) where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) (:<<<%%%%%%%%%%%%%%%%%%%:+$$###)) GHC.Tuple.())+ data (:<<<%%%%%%%%%%%%%%%%%%%:+$$) l (l :: TyFun Nat (TyFun Nat Nat+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) l) arg) ((:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l arg) =>+ (:<<<%%%%%%%%%%%%%%%%%%%:+$$###)+ type instance Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) l) l = (:<<<%%%%%%%%%%%%%%%%%%%:+$$$) l l+ instance SuppressUnusedWarnings (:<<<%%%%%%%%%%%%%%%%%%%:+$) where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) (:<<<%%%%%%%%%%%%%%%%%%%:+$###)) GHC.Tuple.())+ data (:<<<%%%%%%%%%%%%%%%%%%%:+$) l+ = forall arg. SameKind (Apply (:<<<%%%%%%%%%%%%%%%%%%%:+$) arg) ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) arg) =>+ (:<<<%%%%%%%%%%%%%%%%%%%:+$###)+ type instance Apply (:<<<%%%%%%%%%%%%%%%%%%%:+$) l = (:<<<%%%%%%%%%%%%%%%%%%%:+$$) l+ type family (:<<<%%%%%%%%%%%%%%%%%%%:+) x (a :: Nat) (a :: Nat) :: Nat where+ (:<<<%%%%%%%%%%%%%%%%%%%:+) x Zero m = m+ (:<<<%%%%%%%%%%%%%%%%%%%:+) x (Succ n) m = Apply SuccSym0 (Apply (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x) n) m)+ type family Lambda_0123456789876543210 x a_0123456789876543210 t where+ Lambda_0123456789876543210 x a_0123456789876543210 x = x+ type Lambda_0123456789876543210Sym3 t t t =+ Lambda_0123456789876543210 t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type Let0123456789876543210ZSym2 t (t :: Nat) =+ Let0123456789876543210Z t t+ instance SuppressUnusedWarnings Let0123456789876543210ZSym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210ZSym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210ZSym1 l (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply (Let0123456789876543210ZSym1 l) arg) (Let0123456789876543210ZSym2 l arg) =>+ Let0123456789876543210ZSym1KindInference+ type instance Apply (Let0123456789876543210ZSym1 l) l = Let0123456789876543210Z l l+ instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210ZSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210ZSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>+ Let0123456789876543210ZSym0KindInference+ type instance Apply Let0123456789876543210ZSym0 l = Let0123456789876543210ZSym1 l+ type family Let0123456789876543210Z x (a :: Nat) :: Nat where+ Let0123456789876543210Z x a_0123456789876543210 = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) a_0123456789876543210) a_0123456789876543210+ type family Lambda_0123456789876543210 x t where+ Lambda_0123456789876543210 x x = x+ type Lambda_0123456789876543210Sym2 t t =+ Lambda_0123456789876543210 t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type Let0123456789876543210ZSym1 t = Let0123456789876543210Z t+ instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210ZSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210ZSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>+ Let0123456789876543210ZSym0KindInference+ type instance Apply Let0123456789876543210ZSym0 l = Let0123456789876543210Z l+ type family Let0123456789876543210Z x :: Nat where+ Let0123456789876543210Z x = Apply (Apply Lambda_0123456789876543210Sym0 x) ZeroSym0+ type Let0123456789876543210XSym1 t = Let0123456789876543210X t+ instance SuppressUnusedWarnings Let0123456789876543210XSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210XSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210XSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) =>+ Let0123456789876543210XSym0KindInference+ type instance Apply Let0123456789876543210XSym0 l = Let0123456789876543210X l+ type family Let0123456789876543210X x :: Nat where+ Let0123456789876543210X x = ZeroSym0+ type Let0123456789876543210FSym2 t (t :: Nat) =+ Let0123456789876543210F t t+ instance SuppressUnusedWarnings Let0123456789876543210FSym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210FSym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210FSym1 l (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply (Let0123456789876543210FSym1 l) arg) (Let0123456789876543210FSym2 l arg) =>+ Let0123456789876543210FSym1KindInference+ type instance Apply (Let0123456789876543210FSym1 l) l = Let0123456789876543210F l l+ instance SuppressUnusedWarnings Let0123456789876543210FSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210FSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210FSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) =>+ Let0123456789876543210FSym0KindInference+ type instance Apply Let0123456789876543210FSym0 l = Let0123456789876543210FSym1 l+ type family Let0123456789876543210F x (a :: Nat) :: Nat where+ Let0123456789876543210F x y = Apply SuccSym0 y+ type Let0123456789876543210ZSym1 t = Let0123456789876543210Z t+ instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210ZSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210ZSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>+ Let0123456789876543210ZSym0KindInference+ type instance Apply Let0123456789876543210ZSym0 l = Let0123456789876543210Z l+ type family Let0123456789876543210Z x :: Nat where+ Let0123456789876543210Z x = Apply (Let0123456789876543210FSym1 x) x+ type Let0123456789876543210ZSym2 t t = Let0123456789876543210Z t t+ instance SuppressUnusedWarnings Let0123456789876543210ZSym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210ZSym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210ZSym1 l l+ = forall arg. SameKind (Apply (Let0123456789876543210ZSym1 l) arg) (Let0123456789876543210ZSym2 l arg) =>+ Let0123456789876543210ZSym1KindInference+ type instance Apply (Let0123456789876543210ZSym1 l) l = Let0123456789876543210Z l l+ instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210ZSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210ZSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>+ Let0123456789876543210ZSym0KindInference+ type instance Apply Let0123456789876543210ZSym0 l = Let0123456789876543210ZSym1 l+ type family Let0123456789876543210Z x y :: Nat where+ Let0123456789876543210Z x y = Apply SuccSym0 y+ type Let0123456789876543210FSym2 t (t :: Nat) =+ Let0123456789876543210F t t+ instance SuppressUnusedWarnings Let0123456789876543210FSym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210FSym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210FSym1 l (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply (Let0123456789876543210FSym1 l) arg) (Let0123456789876543210FSym2 l arg) =>+ Let0123456789876543210FSym1KindInference+ type instance Apply (Let0123456789876543210FSym1 l) l = Let0123456789876543210F l l+ instance SuppressUnusedWarnings Let0123456789876543210FSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210FSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210FSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) =>+ Let0123456789876543210FSym0KindInference+ type instance Apply Let0123456789876543210FSym0 l = Let0123456789876543210FSym1 l+ type family Let0123456789876543210F x (a :: Nat) :: Nat where+ Let0123456789876543210F x y = Apply SuccSym0 (Let0123456789876543210ZSym2 x y)+ type Let0123456789876543210FSym2 t (t :: Nat) =+ Let0123456789876543210F t t+ instance SuppressUnusedWarnings Let0123456789876543210FSym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210FSym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210FSym1 l (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply (Let0123456789876543210FSym1 l) arg) (Let0123456789876543210FSym2 l arg) =>+ Let0123456789876543210FSym1KindInference+ type instance Apply (Let0123456789876543210FSym1 l) l = Let0123456789876543210F l l+ instance SuppressUnusedWarnings Let0123456789876543210FSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210FSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210FSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) =>+ Let0123456789876543210FSym0KindInference+ type instance Apply Let0123456789876543210FSym0 l = Let0123456789876543210FSym1 l+ type family Let0123456789876543210F x (a :: Nat) :: Nat where+ Let0123456789876543210F x y = Apply SuccSym0 y+ type Let0123456789876543210YSym1 t = Let0123456789876543210Y t+ instance SuppressUnusedWarnings Let0123456789876543210YSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210YSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210YSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) =>+ Let0123456789876543210YSym0KindInference+ type instance Apply Let0123456789876543210YSym0 l = Let0123456789876543210Y l+ type family Let0123456789876543210Y x :: Nat where+ Let0123456789876543210Y x = Apply SuccSym0 x+ type Let0123456789876543210YSym0 = Let0123456789876543210Y+ type Let0123456789876543210ZSym0 = Let0123456789876543210Z+ type family Let0123456789876543210Y where+ = Apply SuccSym0 ZeroSym0+ type family Let0123456789876543210Z where+ = Apply SuccSym0 Let0123456789876543210YSym0+ type Let0123456789876543210YSym1 t = Let0123456789876543210Y t+ instance SuppressUnusedWarnings Let0123456789876543210YSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210YSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210YSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) =>+ Let0123456789876543210YSym0KindInference+ type instance Apply Let0123456789876543210YSym0 l = Let0123456789876543210Y l+ type family Let0123456789876543210Y x :: Nat where+ Let0123456789876543210Y x = Apply SuccSym0 ZeroSym0+ type Foo14Sym1 (t :: Nat) = Foo14 t+ instance SuppressUnusedWarnings Foo14Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo14Sym0KindInference) GHC.Tuple.())+ data Foo14Sym0 (l :: TyFun Nat (Nat, Nat))+ = forall arg. SameKind (Apply Foo14Sym0 arg) (Foo14Sym1 arg) =>+ Foo14Sym0KindInference+ type instance Apply Foo14Sym0 l = Foo14 l+ type Foo13_Sym1 (t :: a0123456789876543210) = Foo13_ t+ instance SuppressUnusedWarnings Foo13_Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo13_Sym0KindInference) GHC.Tuple.())+ data Foo13_Sym0 (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply Foo13_Sym0 arg) (Foo13_Sym1 arg) =>+ Foo13_Sym0KindInference+ type instance Apply Foo13_Sym0 l = Foo13_ l+ type Foo13Sym1 (t :: a0123456789876543210) = Foo13 t+ instance SuppressUnusedWarnings Foo13Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo13Sym0KindInference) GHC.Tuple.())+ data Foo13Sym0 (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply Foo13Sym0 arg) (Foo13Sym1 arg) =>+ Foo13Sym0KindInference+ type instance Apply Foo13Sym0 l = Foo13 l+ type Foo12Sym1 (t :: Nat) = Foo12 t+ instance SuppressUnusedWarnings Foo12Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo12Sym0KindInference) GHC.Tuple.())+ data Foo12Sym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply Foo12Sym0 arg) (Foo12Sym1 arg) =>+ Foo12Sym0KindInference+ type instance Apply Foo12Sym0 l = Foo12 l+ type Foo11Sym1 (t :: Nat) = Foo11 t+ instance SuppressUnusedWarnings Foo11Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo11Sym0KindInference) GHC.Tuple.())+ data Foo11Sym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply Foo11Sym0 arg) (Foo11Sym1 arg) =>+ Foo11Sym0KindInference+ type instance Apply Foo11Sym0 l = Foo11 l+ type Foo10Sym1 (t :: Nat) = Foo10 t+ instance SuppressUnusedWarnings Foo10Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo10Sym0KindInference) GHC.Tuple.())+ data Foo10Sym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply Foo10Sym0 arg) (Foo10Sym1 arg) =>+ Foo10Sym0KindInference+ type instance Apply Foo10Sym0 l = Foo10 l+ type Foo9Sym1 (t :: Nat) = Foo9 t+ instance SuppressUnusedWarnings Foo9Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo9Sym0KindInference) GHC.Tuple.())+ data Foo9Sym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply Foo9Sym0 arg) (Foo9Sym1 arg) =>+ Foo9Sym0KindInference+ type instance Apply Foo9Sym0 l = Foo9 l+ type Foo8Sym1 (t :: Nat) = Foo8 t+ instance SuppressUnusedWarnings Foo8Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo8Sym0KindInference) GHC.Tuple.())+ data Foo8Sym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) =>+ Foo8Sym0KindInference+ type instance Apply Foo8Sym0 l = Foo8 l+ type Foo7Sym1 (t :: Nat) = Foo7 t+ instance SuppressUnusedWarnings Foo7Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo7Sym0KindInference) GHC.Tuple.())+ data Foo7Sym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) =>+ Foo7Sym0KindInference+ type instance Apply Foo7Sym0 l = Foo7 l+ type Foo6Sym1 (t :: Nat) = Foo6 t+ instance SuppressUnusedWarnings Foo6Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo6Sym0KindInference) GHC.Tuple.())+ data Foo6Sym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) =>+ Foo6Sym0KindInference+ type instance Apply Foo6Sym0 l = Foo6 l+ type Foo5Sym1 (t :: Nat) = Foo5 t+ instance SuppressUnusedWarnings Foo5Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo5Sym0KindInference) GHC.Tuple.())+ data Foo5Sym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) =>+ Foo5Sym0KindInference+ type instance Apply Foo5Sym0 l = Foo5 l+ type Foo4Sym1 (t :: Nat) = Foo4 t+ instance SuppressUnusedWarnings Foo4Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo4Sym0KindInference) GHC.Tuple.())+ data Foo4Sym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) =>+ Foo4Sym0KindInference+ type instance Apply Foo4Sym0 l = Foo4 l+ type Foo3Sym1 (t :: Nat) = Foo3 t+ instance SuppressUnusedWarnings Foo3Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo3Sym0KindInference) GHC.Tuple.())+ data Foo3Sym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>+ Foo3Sym0KindInference+ type instance Apply Foo3Sym0 l = Foo3 l+ type Foo2Sym0 = Foo2+ type Foo1Sym1 (t :: Nat) = Foo1 t+ instance SuppressUnusedWarnings Foo1Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo1Sym0KindInference) GHC.Tuple.())+ data Foo1Sym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>+ Foo1Sym0KindInference+ type instance Apply Foo1Sym0 l = Foo1 l+ type family Foo14 (a :: Nat) :: (Nat, Nat) where+ Foo14 x = Apply (Apply Tuple2Sym0 (Let0123456789876543210ZSym1 x)) (Let0123456789876543210YSym1 x)+ type family Foo13_ (a :: a) :: a where+ Foo13_ y = y+ type family Foo13 (a :: a) :: a where+ Foo13 x = Apply Foo13_Sym0 (Let0123456789876543210BarSym1 x)+ type family Foo12 (a :: Nat) :: Nat where+ Foo12 x = Apply (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x) x) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))+ type family Foo11 (a :: Nat) :: Nat where+ Foo11 x = Apply (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x) (Apply SuccSym0 ZeroSym0)) (Let0123456789876543210ZSym1 x)+ type family Foo10 (a :: Nat) :: Nat where+ Foo10 x = Apply (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x) (Apply SuccSym0 ZeroSym0)) x+ type family Foo9 (a :: Nat) :: Nat where+ Foo9 x = Apply (Let0123456789876543210ZSym1 x) x+ type family Foo8 (a :: Nat) :: Nat where+ Foo8 x = Let0123456789876543210ZSym1 x+ type family Foo7 (a :: Nat) :: Nat where+ Foo7 x = Let0123456789876543210XSym1 x+ type family Foo6 (a :: Nat) :: Nat where+ Foo6 x = Let0123456789876543210ZSym1 x+ type family Foo5 (a :: Nat) :: Nat where+ Foo5 x = Apply (Let0123456789876543210FSym1 x) x+ type family Foo4 (a :: Nat) :: Nat where+ Foo4 x = Apply (Let0123456789876543210FSym1 x) x+ type family Foo3 (a :: Nat) :: Nat where+ Foo3 x = Let0123456789876543210YSym1 x+ type family Foo2 :: Nat where+ = Let0123456789876543210ZSym0+ type family Foo1 (a :: Nat) :: Nat where+ Foo1 x = Let0123456789876543210YSym1 x+ sFoo14 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo14Sym0 t :: (Nat, Nat))+ sFoo13_ ::+ forall (t :: a). Sing t -> Sing (Apply Foo13_Sym0 t :: a)+ sFoo13 :: forall (t :: a). Sing t -> Sing (Apply Foo13Sym0 t :: a)+ sFoo12 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo12Sym0 t :: Nat)+ sFoo11 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo11Sym0 t :: Nat)+ sFoo10 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo10Sym0 t :: Nat)+ sFoo9 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo9Sym0 t :: Nat)+ sFoo8 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo8Sym0 t :: Nat)+ sFoo7 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo7Sym0 t :: Nat)+ sFoo6 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo6Sym0 t :: Nat)+ sFoo5 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo5Sym0 t :: Nat)+ sFoo4 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo4Sym0 t :: Nat)+ sFoo3 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo3Sym0 t :: Nat)+ sFoo2 :: Sing (Foo2Sym0 :: Nat)+ sFoo1 ::+ forall (t :: Nat). Sing t -> Sing (Apply Foo1Sym0 t :: Nat)+ sFoo14 (sX :: Sing x)+ = let+ sY :: Sing (Let0123456789876543210YSym1 x)+ sZ :: Sing (Let0123456789876543210ZSym1 x)+ sX_0123456789876543210 ::+ Sing (Let0123456789876543210X_0123456789876543210Sym1 x)+ sY+ = case sX_0123456789876543210 of {+ STuple2 (sY_0123456789876543210 :: Sing y_0123456789876543210) _+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x))+ sZ+ = case sX_0123456789876543210 of {+ STuple2 _ (sY_0123456789876543210 :: Sing y_0123456789876543210)+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x))+ sX_0123456789876543210+ = (applySing+ ((applySing ((singFun2 @Tuple2Sym0) STuple2))+ ((applySing ((singFun1 @SuccSym0) SSucc)) sX)))+ sX+ in (applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sZ)) sY+ sFoo13_ (sY :: Sing y) = sY+ sFoo13 (sX :: Sing x)+ = let+ sBar :: Sing (Let0123456789876543210BarSym1 x :: a)+ sBar = sX+ in (applySing ((singFun1 @Foo13_Sym0) sFoo13_)) sBar+ sFoo12 (sX :: Sing x)+ = let+ (%:+) ::+ forall (t :: Nat) (t :: Nat).+ Sing t+ -> Sing t+ -> Sing (Apply (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x) t) t :: Nat)+ (%:+) SZero (sM :: Sing m) = sM+ (%:+) (SSucc (sN :: Sing n)) (sM :: Sing m)+ = (applySing ((singFun1 @SuccSym0) SSucc))+ ((applySing+ ((applySing ((singFun2 @((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x)) (%:+)))+ sN))+ sX)+ in+ (applySing+ ((applySing ((singFun2 @((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x)) (%:+)))+ sX))+ ((applySing ((singFun1 @SuccSym0) SSucc))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))+ sFoo11 (sX :: Sing x)+ = let+ sZ :: Sing (Let0123456789876543210ZSym1 x :: Nat)+ (%:+) ::+ forall (t :: Nat) (t :: Nat).+ Sing t+ -> Sing t+ -> Sing (Apply (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x) t) t :: Nat)+ sZ = sX+ (%:+) SZero (sM :: Sing m) = sM+ (%:+) (SSucc (sN :: Sing n)) (sM :: Sing m)+ = (applySing ((singFun1 @SuccSym0) SSucc))+ ((applySing+ ((applySing ((singFun2 @((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x)) (%:+)))+ sN))+ sM)+ in+ (applySing+ ((applySing ((singFun2 @((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x)) (%:+)))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ sZ+ sFoo10 (sX :: Sing x)+ = let+ (%:+) ::+ forall (t :: Nat) (t :: Nat).+ Sing t+ -> Sing t+ -> Sing (Apply (Apply ((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x) t) t :: Nat)+ (%:+) SZero (sM :: Sing m) = sM+ (%:+) (SSucc (sN :: Sing n)) (sM :: Sing m)+ = (applySing ((singFun1 @SuccSym0) SSucc))+ ((applySing+ ((applySing ((singFun2 @((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x)) (%:+)))+ sN))+ sM)+ in+ (applySing+ ((applySing ((singFun2 @((:<<<%%%%%%%%%%%%%%%%%%%:+$$) x)) (%:+)))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ sX+ sFoo9 (sX :: Sing x)+ = let+ sZ ::+ forall (t :: Nat).+ Sing t -> Sing (Apply (Let0123456789876543210ZSym1 x) t :: Nat)+ sZ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ ((singFun1+ @(Apply (Apply Lambda_0123456789876543210Sym0 x) a_0123456789876543210))+ (\ sX -> case sX of { _ :: Sing x -> sX })))+ sA_0123456789876543210+ in (applySing ((singFun1 @(Let0123456789876543210ZSym1 x)) sZ)) sX+ sFoo8 (sX :: Sing x)+ = let+ sZ :: Sing (Let0123456789876543210ZSym1 x :: Nat)+ sZ+ = (applySing+ ((singFun1 @(Apply Lambda_0123456789876543210Sym0 x))+ (\ sX -> case sX of { _ :: Sing x -> sX })))+ SZero+ in sZ+ sFoo7 (sX :: Sing x)+ = let+ sX :: Sing (Let0123456789876543210XSym1 x :: Nat)+ sX = SZero+ in sX+ sFoo6 (sX :: Sing x)+ = let+ sF ::+ forall (t :: Nat).+ Sing t -> Sing (Apply (Let0123456789876543210FSym1 x) t :: Nat)+ sF (sY :: Sing y) = (applySing ((singFun1 @SuccSym0) SSucc)) sY in+ let+ sZ :: Sing (Let0123456789876543210ZSym1 x :: Nat)+ sZ+ = (applySing ((singFun1 @(Let0123456789876543210FSym1 x)) sF)) sX+ in sZ+ sFoo5 (sX :: Sing x)+ = let+ sF ::+ forall (t :: Nat).+ Sing t -> Sing (Apply (Let0123456789876543210FSym1 x) t :: Nat)+ sF (sY :: Sing y)+ = let+ sZ :: Sing (Let0123456789876543210ZSym2 x y :: Nat)+ sZ = (applySing ((singFun1 @SuccSym0) SSucc)) sY+ in (applySing ((singFun1 @SuccSym0) SSucc)) sZ+ in (applySing ((singFun1 @(Let0123456789876543210FSym1 x)) sF)) sX+ sFoo4 (sX :: Sing x)+ = let+ sF ::+ forall (t :: Nat).+ Sing t -> Sing (Apply (Let0123456789876543210FSym1 x) t :: Nat)+ sF (sY :: Sing y) = (applySing ((singFun1 @SuccSym0) SSucc)) sY+ in (applySing ((singFun1 @(Let0123456789876543210FSym1 x)) sF)) sX+ sFoo3 (sX :: Sing x)+ = let+ sY :: Sing (Let0123456789876543210YSym1 x :: Nat)+ sY = (applySing ((singFun1 @SuccSym0) SSucc)) sX+ in sY+ sFoo2+ = let+ sY :: Sing Let0123456789876543210YSym0+ sZ :: Sing Let0123456789876543210ZSym0+ sY = (applySing ((singFun1 @SuccSym0) SSucc)) SZero+ sZ = (applySing ((singFun1 @SuccSym0) SSucc)) sY+ in sZ+ sFoo1 (sX :: Sing x)+ = let+ sY :: Sing (Let0123456789876543210YSym1 x :: Nat)+ sY = (applySing ((singFun1 @SuccSym0) SSucc)) SZero+ in sY
− tests/compile-and-dump/Singletons/Maybe.ghc80.template
@@ -1,63 +0,0 @@-Singletons/Maybe.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| data Maybe a- = Nothing | Just a- deriving (Eq, Show) |]- ======>- data Maybe a- = Nothing | Just a- deriving (Eq, Show)- type family Equals_0123456789 (a :: Maybe k)- (b :: Maybe k) :: Bool where- Equals_0123456789 Nothing Nothing = TrueSym0- Equals_0123456789 (Just a) (Just b) = (:==) a b- Equals_0123456789 (a :: Maybe k) (b :: Maybe k) = FalseSym0- instance PEq (Proxy :: Proxy (Maybe k)) where- type (:==) (a :: Maybe k) (b :: Maybe k) = Equals_0123456789 a b- type NothingSym0 = Nothing- type JustSym1 (t :: a0123456789) = Just t- instance SuppressUnusedWarnings JustSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) JustSym0KindInference GHC.Tuple.())- data JustSym0 (l :: TyFun a0123456789 (Maybe a0123456789))- = forall arg. KindOf (Apply JustSym0 arg) ~ KindOf (JustSym1 arg) =>- JustSym0KindInference- type instance Apply JustSym0 l = JustSym1 l- data instance Sing (z :: Maybe a)- = z ~ Nothing => SNothing |- forall (n :: a). z ~ Just n => SJust (Sing (n :: a))- type SMaybe = (Sing :: Maybe a -> GHC.Types.Type)- instance SingKind a => SingKind (Maybe a) where- type DemoteRep (Maybe a) = Maybe (DemoteRep a)- fromSing SNothing = Nothing- fromSing (SJust b) = Just (fromSing b)- toSing Nothing = SomeSing SNothing- toSing (Just b)- = case toSing b :: SomeSing a of {- SomeSing c -> SomeSing (SJust c) }- instance SEq a => SEq (Maybe a) where- (%:==) SNothing SNothing = STrue- (%:==) SNothing (SJust _) = SFalse- (%:==) (SJust _) SNothing = SFalse- (%:==) (SJust a) (SJust b) = (%:==) a b- instance SDecide a => SDecide (Maybe a) where- (%~) SNothing SNothing = Proved Refl- (%~) SNothing (SJust _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SJust _) SNothing- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SJust a) (SJust b)- = case (%~) a b of {- Proved Refl -> Proved Refl- Disproved contra- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- instance SingI Nothing where- sing = SNothing- instance SingI n => SingI (Just (n :: a)) where- sing = SJust sing
+ tests/compile-and-dump/Singletons/Maybe.ghc82.template view
@@ -0,0 +1,62 @@+Singletons/Maybe.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| data Maybe a+ = Nothing | Just a+ deriving (Eq, Show) |]+ ======>+ data Maybe a+ = Nothing | Just a+ deriving (Eq, Show)+ type family Equals_0123456789876543210 (a :: Maybe k) (b :: Maybe k) :: Bool where+ Equals_0123456789876543210 Nothing Nothing = TrueSym0+ Equals_0123456789876543210 (Just a) (Just b) = (:==) a b+ Equals_0123456789876543210 (a :: Maybe k) (b :: Maybe k) = FalseSym0+ instance PEq (Maybe k) where+ type (:==) (a :: Maybe k) (b :: Maybe k) = Equals_0123456789876543210 a b+ type NothingSym0 = Nothing+ type JustSym1 (t :: a0123456789876543210) = Just t+ instance SuppressUnusedWarnings JustSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) JustSym0KindInference) GHC.Tuple.())+ data JustSym0 (l :: TyFun a0123456789876543210 (Maybe a0123456789876543210))+ = forall arg. SameKind (Apply JustSym0 arg) (JustSym1 arg) =>+ JustSym0KindInference+ type instance Apply JustSym0 l = Just l+ data instance Sing (z :: Maybe a)+ = z ~ Nothing => SNothing |+ forall (n :: a). z ~ Just n => SJust (Sing (n :: a))+ type SMaybe = (Sing :: Maybe a -> GHC.Types.Type)+ instance SingKind a => SingKind (Maybe a) where+ type Demote (Maybe a) = Maybe (Demote a)+ fromSing SNothing = Nothing+ fromSing (SJust b) = Just (fromSing b)+ toSing Nothing = SomeSing SNothing+ toSing (Just b)+ = case toSing b :: SomeSing a of {+ SomeSing c -> SomeSing (SJust c) }+ instance SEq a => SEq (Maybe a) where+ (%:==) SNothing SNothing = STrue+ (%:==) SNothing (SJust _) = SFalse+ (%:==) (SJust _) SNothing = SFalse+ (%:==) (SJust a) (SJust b) = ((%:==) a) b+ instance SDecide a => SDecide (Maybe a) where+ (%~) SNothing SNothing = Proved Refl+ (%~) SNothing (SJust _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SJust _) SNothing+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SJust a) (SJust b)+ = case ((%~) a) b of+ Proved Refl -> Proved Refl+ Disproved contra+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ instance SingI Nothing where+ sing = SNothing+ instance SingI n => SingI (Just (n :: a)) where+ sing = SJust sing
− tests/compile-and-dump/Singletons/Nat.ghc80.template
@@ -1,145 +0,0 @@-Singletons/Nat.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| plus :: Nat -> Nat -> Nat- plus Zero m = m- plus (Succ n) m = Succ (plus n m)- pred :: Nat -> Nat- pred Zero = Zero- pred (Succ n) = n- - data Nat- where- Zero :: Nat- Succ :: Nat -> Nat- deriving (Eq, Show, Read) |]- ======>- data Nat- where- Zero :: Nat- Succ :: Nat -> Nat- deriving (Eq, Show, Read)- plus :: Nat -> Nat -> Nat- plus Zero m = m- plus (Succ n) m = Succ (plus n m)- pred :: Nat -> Nat- pred Zero = Zero- pred (Succ n) = n- type family Equals_0123456789 (a :: Nat) (b :: Nat) :: Bool where- Equals_0123456789 Zero Zero = TrueSym0- Equals_0123456789 (Succ a) (Succ b) = (:==) a b- Equals_0123456789 (a :: Nat) (b :: Nat) = FalseSym0- instance PEq (Proxy :: Proxy Nat) where- type (:==) (a :: Nat) (b :: Nat) = Equals_0123456789 a b- type ZeroSym0 = Zero- type SuccSym1 (t :: Nat) = Succ t- instance SuppressUnusedWarnings SuccSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) SuccSym0KindInference GHC.Tuple.())- data SuccSym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply SuccSym0 arg) ~ KindOf (SuccSym1 arg) =>- SuccSym0KindInference- type instance Apply SuccSym0 l = SuccSym1 l- type PredSym1 (t :: Nat) = Pred t- instance SuppressUnusedWarnings PredSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) PredSym0KindInference GHC.Tuple.())- data PredSym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply PredSym0 arg) ~ KindOf (PredSym1 arg) =>- PredSym0KindInference- type instance Apply PredSym0 l = PredSym1 l- type PlusSym2 (t :: Nat) (t :: Nat) = Plus t t- instance SuppressUnusedWarnings PlusSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) PlusSym1KindInference GHC.Tuple.())- data PlusSym1 (l :: Nat) (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply (PlusSym1 l) arg) ~ KindOf (PlusSym2 l arg) =>- PlusSym1KindInference- type instance Apply (PlusSym1 l) l = PlusSym2 l l- instance SuppressUnusedWarnings PlusSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) PlusSym0KindInference GHC.Tuple.())- data PlusSym0 (l :: TyFun Nat (TyFun Nat Nat -> GHC.Types.Type))- = forall arg. KindOf (Apply PlusSym0 arg) ~ KindOf (PlusSym1 arg) =>- PlusSym0KindInference- type instance Apply PlusSym0 l = PlusSym1 l- type family Pred (a :: Nat) :: Nat where- Pred Zero = ZeroSym0- Pred (Succ n) = n- type family Plus (a :: Nat) (a :: Nat) :: Nat where- Plus Zero m = m- Plus (Succ n) m = Apply SuccSym0 (Apply (Apply PlusSym0 n) m)- sPred ::- forall (t :: Nat). Sing t -> Sing (Apply PredSym0 t :: Nat)- sPlus ::- forall (t :: Nat) (t :: Nat).- Sing t -> Sing t -> Sing (Apply (Apply PlusSym0 t) t :: Nat)- sPred SZero- = let- lambda :: t ~ ZeroSym0 => Sing (Apply PredSym0 t :: Nat)- lambda = SZero- in lambda- sPred (SSucc sN)- = let- lambda ::- forall n.- t ~ Apply SuccSym0 n => Sing n -> Sing (Apply PredSym0 t :: Nat)- lambda n = n- in lambda sN- sPlus SZero sM- = let- lambda ::- forall m.- (t ~ ZeroSym0, t ~ m) =>- Sing m -> Sing (Apply (Apply PlusSym0 t) t :: Nat)- lambda m = m- in lambda sM- sPlus (SSucc sN) sM- = let- lambda ::- forall n m.- (t ~ Apply SuccSym0 n, t ~ m) =>- Sing n -> Sing m -> Sing (Apply (Apply PlusSym0 t) t :: Nat)- lambda n m- = applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)- (applySing- (applySing (singFun2 (Proxy :: Proxy PlusSym0) sPlus) n) m)- in lambda sN sM- data instance Sing (z :: Nat)- = z ~ Zero => SZero |- forall (n :: Nat). z ~ Succ n => SSucc (Sing (n :: Nat))- type SNat = (Sing :: Nat -> GHC.Types.Type)- instance SingKind Nat where- type DemoteRep Nat = Nat- fromSing SZero = Zero- fromSing (SSucc b) = Succ (fromSing b)- toSing Zero = SomeSing SZero- toSing (Succ b)- = case toSing b :: SomeSing Nat of {- SomeSing c -> SomeSing (SSucc c) }- instance SEq Nat where- (%:==) SZero SZero = STrue- (%:==) SZero (SSucc _) = SFalse- (%:==) (SSucc _) SZero = SFalse- (%:==) (SSucc a) (SSucc b) = (%:==) a b- instance SDecide Nat where- (%~) SZero SZero = Proved Refl- (%~) SZero (SSucc _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SSucc _) SZero- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SSucc a) (SSucc b)- = case (%~) a b of {- Proved Refl -> Proved Refl- Disproved contra- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- instance SingI Zero where- sing = SZero- instance SingI n => SingI (Succ (n :: Nat)) where- sing = SSucc sing
+ tests/compile-and-dump/Singletons/Nat.ghc82.template view
@@ -0,0 +1,119 @@+Singletons/Nat.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| plus :: Nat -> Nat -> Nat+ plus Zero m = m+ plus (Succ n) m = Succ (plus n m)+ pred :: Nat -> Nat+ pred Zero = Zero+ pred (Succ n) = n+ + data Nat+ where+ Zero :: Nat+ Succ :: Nat -> Nat+ deriving (Eq, Show, Read) |]+ ======>+ data Nat+ where+ Zero :: Nat+ Succ :: Nat -> Nat+ deriving (Eq, Show, Read)+ plus :: Nat -> Nat -> Nat+ plus Zero m = m+ plus (Succ n) m = Succ ((plus n) m)+ pred :: Nat -> Nat+ pred Zero = Zero+ pred (Succ n) = n+ type family Equals_0123456789876543210 (a :: Nat) (b :: Nat) :: Bool where+ Equals_0123456789876543210 Zero Zero = TrueSym0+ Equals_0123456789876543210 (Succ a) (Succ b) = (:==) a b+ Equals_0123456789876543210 (a :: Nat) (b :: Nat) = FalseSym0+ instance PEq Nat where+ type (:==) (a :: Nat) (b :: Nat) = Equals_0123456789876543210 a b+ type ZeroSym0 = Zero+ type SuccSym1 (t :: Nat) = Succ t+ instance SuppressUnusedWarnings SuccSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) SuccSym0KindInference) GHC.Tuple.())+ data SuccSym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>+ SuccSym0KindInference+ type instance Apply SuccSym0 l = Succ l+ type PredSym1 (t :: Nat) = Pred t+ instance SuppressUnusedWarnings PredSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) PredSym0KindInference) GHC.Tuple.())+ data PredSym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply PredSym0 arg) (PredSym1 arg) =>+ PredSym0KindInference+ type instance Apply PredSym0 l = Pred l+ type PlusSym2 (t :: Nat) (t :: Nat) = Plus t t+ instance SuppressUnusedWarnings PlusSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) PlusSym1KindInference) GHC.Tuple.())+ data PlusSym1 (l :: Nat) (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply (PlusSym1 l) arg) (PlusSym2 l arg) =>+ PlusSym1KindInference+ type instance Apply (PlusSym1 l) l = Plus l l+ instance SuppressUnusedWarnings PlusSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) PlusSym0KindInference) GHC.Tuple.())+ data PlusSym0 (l :: TyFun Nat (TyFun Nat Nat -> GHC.Types.Type))+ = forall arg. SameKind (Apply PlusSym0 arg) (PlusSym1 arg) =>+ PlusSym0KindInference+ type instance Apply PlusSym0 l = PlusSym1 l+ type family Pred (a :: Nat) :: Nat where+ Pred Zero = ZeroSym0+ Pred (Succ n) = n+ type family Plus (a :: Nat) (a :: Nat) :: Nat where+ Plus Zero m = m+ Plus (Succ n) m = Apply SuccSym0 (Apply (Apply PlusSym0 n) m)+ sPred ::+ forall (t :: Nat). Sing t -> Sing (Apply PredSym0 t :: Nat)+ sPlus ::+ forall (t :: Nat) (t :: Nat).+ Sing t -> Sing t -> Sing (Apply (Apply PlusSym0 t) t :: Nat)+ sPred SZero = SZero+ sPred (SSucc (sN :: Sing n)) = sN+ sPlus SZero (sM :: Sing m) = sM+ sPlus (SSucc (sN :: Sing n)) (sM :: Sing m)+ = (applySing ((singFun1 @SuccSym0) SSucc))+ ((applySing ((applySing ((singFun2 @PlusSym0) sPlus)) sN)) sM)+ data instance Sing (z :: Nat)+ = z ~ Zero => SZero |+ forall (n :: Nat). z ~ Succ n => SSucc (Sing (n :: Nat))+ type SNat = (Sing :: Nat -> GHC.Types.Type)+ instance SingKind Nat where+ type Demote Nat = Nat+ fromSing SZero = Zero+ fromSing (SSucc b) = Succ (fromSing b)+ toSing Zero = SomeSing SZero+ toSing (Succ b)+ = case toSing b :: SomeSing Nat of {+ SomeSing c -> SomeSing (SSucc c) }+ instance SEq Nat where+ (%:==) SZero SZero = STrue+ (%:==) SZero (SSucc _) = SFalse+ (%:==) (SSucc _) SZero = SFalse+ (%:==) (SSucc a) (SSucc b) = ((%:==) a) b+ instance SDecide Nat where+ (%~) SZero SZero = Proved Refl+ (%~) SZero (SSucc _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SSucc _) SZero+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SSucc a) (SSucc b)+ = case ((%~) a) b of+ Proved Refl -> Proved Refl+ Disproved contra+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ instance SingI Zero where+ sing = SZero+ instance SingI n => SingI (Succ (n :: Nat)) where+ sing = SSucc sing
− tests/compile-and-dump/Singletons/Operators.ghc80.template
@@ -1,126 +0,0 @@-Singletons/Operators.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| child :: Foo -> Foo- child FLeaf = FLeaf- child (a :+: _) = a- (+) :: Nat -> Nat -> Nat- Zero + m = m- (Succ n) + m = Succ (n + m)- - data Foo- where- FLeaf :: Foo- (:+:) :: Foo -> Foo -> Foo |]- ======>- data Foo- where- FLeaf :: Foo- (:+:) :: Foo -> Foo -> Foo- child :: Foo -> Foo- child FLeaf = FLeaf- child (a :+: _) = a- (+) :: Nat -> Nat -> Nat- (+) Zero m = m- (+) (Succ n) m = Succ (n + m)- type FLeafSym0 = FLeaf- type (:+:$$$) (t :: Foo) (t :: Foo) = (:+:) t t- instance SuppressUnusedWarnings (:+:$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:+:$$###) GHC.Tuple.())- data (:+:$$) (l :: Foo) (l :: TyFun Foo Foo)- = forall arg. KindOf (Apply ((:+:$$) l) arg) ~ KindOf ((:+:$$$) l arg) =>- (:+:$$###)- type instance Apply ((:+:$$) l) l = (:+:$$$) l l- instance SuppressUnusedWarnings (:+:$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:+:$###) GHC.Tuple.())- data (:+:$) (l :: TyFun Foo (TyFun Foo Foo -> GHC.Types.Type))- = forall arg. KindOf (Apply (:+:$) arg) ~ KindOf ((:+:$$) arg) =>- (:+:$###)- type instance Apply (:+:$) l = (:+:$$) l- type (:+$$$) (t :: Nat) (t :: Nat) = (:+) t t- instance SuppressUnusedWarnings (:+$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:+$$###) GHC.Tuple.())- data (:+$$) (l :: Nat) (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply ((:+$$) l) arg) ~ KindOf ((:+$$$) l arg) =>- (:+$$###)- type instance Apply ((:+$$) l) l = (:+$$$) l l- instance SuppressUnusedWarnings (:+$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:+$###) GHC.Tuple.())- data (:+$) (l :: TyFun Nat (TyFun Nat Nat -> GHC.Types.Type))- = forall arg. KindOf (Apply (:+$) arg) ~ KindOf ((:+$$) arg) =>- (:+$###)- type instance Apply (:+$) l = (:+$$) l- type ChildSym1 (t :: Foo) = Child t- instance SuppressUnusedWarnings ChildSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ChildSym0KindInference GHC.Tuple.())- data ChildSym0 (l :: TyFun Foo Foo)- = forall arg. KindOf (Apply ChildSym0 arg) ~ KindOf (ChildSym1 arg) =>- ChildSym0KindInference- type instance Apply ChildSym0 l = ChildSym1 l- type family (:+) (a :: Nat) (a :: Nat) :: Nat where- (:+) Zero m = m- (:+) (Succ n) m = Apply SuccSym0 (Apply (Apply (:+$) n) m)- type family Child (a :: Foo) :: Foo where- Child FLeaf = FLeafSym0- Child ((:+:) a _z_0123456789) = a- (%:+) ::- forall (t :: Nat) (t :: Nat).- Sing t -> Sing t -> Sing (Apply (Apply (:+$) t) t :: Nat)- sChild ::- forall (t :: Foo). Sing t -> Sing (Apply ChildSym0 t :: Foo)- (%:+) SZero sM- = let- lambda ::- forall m.- (t ~ ZeroSym0, t ~ m) =>- Sing m -> Sing (Apply (Apply (:+$) t) t :: Nat)- lambda m = m- in lambda sM- (%:+) (SSucc sN) sM- = let- lambda ::- forall n m.- (t ~ Apply SuccSym0 n, t ~ m) =>- Sing n -> Sing m -> Sing (Apply (Apply (:+$) t) t :: Nat)- lambda n m- = applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)- (applySing (applySing (singFun2 (Proxy :: Proxy (:+$)) (%:+)) n) m)- in lambda sN sM- sChild SFLeaf- = let- lambda :: t ~ FLeafSym0 => Sing (Apply ChildSym0 t :: Foo)- lambda = SFLeaf- in lambda- sChild ((:%+:) sA _s_z_0123456789)- = let- lambda ::- forall a _z_0123456789.- t ~ Apply (Apply (:+:$) a) _z_0123456789 =>- Sing a -> Sing _z_0123456789 -> Sing (Apply ChildSym0 t :: Foo)- lambda a _z_0123456789 = a- in lambda sA _s_z_0123456789- data instance Sing (z :: Foo)- = z ~ FLeaf => SFLeaf |- forall (n :: Foo) (n :: Foo). z ~ (:+:) n n =>- (:%+:) (Sing (n :: Foo)) (Sing (n :: Foo))- type SFoo = (Sing :: Foo -> GHC.Types.Type)- instance SingKind Foo where- type DemoteRep Foo = Foo- fromSing SFLeaf = FLeaf- fromSing ((:%+:) b b) = (:+:) (fromSing b) (fromSing b)- toSing FLeaf = SomeSing SFLeaf- toSing ((:+:) b b)- = case- GHC.Tuple.(,) (toSing b :: SomeSing Foo) (toSing b :: SomeSing Foo)- of {- GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing ((:%+:) c c) }- instance SingI FLeaf where- sing = SFLeaf- instance (SingI n, SingI n) =>- SingI ((:+:) (n :: Foo) (n :: Foo)) where- sing = (:%+:) sing sing
+ tests/compile-and-dump/Singletons/Operators.ghc82.template view
@@ -0,0 +1,101 @@+Singletons/Operators.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| child :: Foo -> Foo+ child FLeaf = FLeaf+ child (a :+: _) = a+ (+) :: Nat -> Nat -> Nat+ Zero + m = m+ (Succ n) + m = Succ (n + m)+ + data Foo+ where+ FLeaf :: Foo+ (:+:) :: Foo -> Foo -> Foo |]+ ======>+ data Foo+ where+ FLeaf :: Foo+ (:+:) :: Foo -> Foo -> Foo+ child :: Foo -> Foo+ child FLeaf = FLeaf+ child (a :+: _) = a+ (+) :: Nat -> Nat -> Nat+ (+) Zero m = m+ (+) (Succ n) m = Succ (n + m)+ type FLeafSym0 = FLeaf+ type (:+:$$$) (t :: Foo) (t :: Foo) = (:+:) t t+ instance SuppressUnusedWarnings (:+:$$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:+:$$###)) GHC.Tuple.())+ data (:+:$$) (l :: Foo) (l :: TyFun Foo Foo)+ = forall arg. SameKind (Apply ((:+:$$) l) arg) ((:+:$$$) l arg) =>+ (:+:$$###)+ type instance Apply ((:+:$$) l) l = (:+:) l l+ instance SuppressUnusedWarnings (:+:$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:+:$###)) GHC.Tuple.())+ data (:+:$) (l :: TyFun Foo (TyFun Foo Foo -> GHC.Types.Type))+ = forall arg. SameKind (Apply (:+:$) arg) ((:+:$$) arg) =>+ (:+:$###)+ type instance Apply (:+:$) l = (:+:$$) l+ type (:+$$$) (t :: Nat) (t :: Nat) = (:+) t t+ instance SuppressUnusedWarnings (:+$$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:+$$###)) GHC.Tuple.())+ data (:+$$) (l :: Nat) (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply ((:+$$) l) arg) ((:+$$$) l arg) =>+ (:+$$###)+ type instance Apply ((:+$$) l) l = (:+) l l+ instance SuppressUnusedWarnings (:+$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:+$###)) GHC.Tuple.())+ data (:+$) (l :: TyFun Nat (TyFun Nat Nat -> GHC.Types.Type))+ = forall arg. SameKind (Apply (:+$) arg) ((:+$$) arg) => (:+$###)+ type instance Apply (:+$) l = (:+$$) l+ type ChildSym1 (t :: Foo) = Child t+ instance SuppressUnusedWarnings ChildSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ChildSym0KindInference) GHC.Tuple.())+ data ChildSym0 (l :: TyFun Foo Foo)+ = forall arg. SameKind (Apply ChildSym0 arg) (ChildSym1 arg) =>+ ChildSym0KindInference+ type instance Apply ChildSym0 l = Child l+ type family (:+) (a :: Nat) (a :: Nat) :: Nat where+ (:+) Zero m = m+ (:+) (Succ n) m = Apply SuccSym0 (Apply (Apply (:+$) n) m)+ type family Child (a :: Foo) :: Foo where+ Child FLeaf = FLeafSym0+ Child ((:+:) a _z_0123456789876543210) = a+ (%:+) ::+ forall (t :: Nat) (t :: Nat).+ Sing t -> Sing t -> Sing (Apply (Apply (:+$) t) t :: Nat)+ sChild ::+ forall (t :: Foo). Sing t -> Sing (Apply ChildSym0 t :: Foo)+ (%:+) SZero (sM :: Sing m) = sM+ (%:+) (SSucc (sN :: Sing n)) (sM :: Sing m)+ = (applySing ((singFun1 @SuccSym0) SSucc))+ ((applySing ((applySing ((singFun2 @(:+$)) (%:+))) sN)) sM)+ sChild SFLeaf = SFLeaf+ sChild ((:%+:) (sA :: Sing a) _) = sA+ data instance Sing (z :: Foo)+ = z ~ FLeaf => SFLeaf |+ forall (n :: Foo) (n :: Foo). z ~ (:+:) n n =>+ (:%+:) (Sing (n :: Foo)) (Sing (n :: Foo))+ type SFoo = (Sing :: Foo -> GHC.Types.Type)+ instance SingKind Foo where+ type Demote Foo = Foo+ fromSing SFLeaf = FLeaf+ fromSing ((:%+:) b b) = ((:+:) (fromSing b)) (fromSing b)+ toSing FLeaf = SomeSing SFLeaf+ toSing ((:+:) b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing Foo))+ (toSing b :: SomeSing Foo)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c)+ -> SomeSing (((:%+:) c) c) }+ instance SingI FLeaf where+ sing = SFLeaf+ instance (SingI n, SingI n) =>+ SingI ((:+:) (n :: Foo) (n :: Foo)) where+ sing = ((:%+:) sing) sing
− tests/compile-and-dump/Singletons/OrdDeriving.ghc80.template
@@ -1,2913 +0,0 @@-Singletons/OrdDeriving.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| data Nat- = Zero | Succ Nat- deriving (Eq, Ord)- data Foo a b c d- = A a b c d |- B a b c d |- C a b c d |- D a b c d |- E a b c d |- F a b c d- deriving (Eq, Ord) |]- ======>- data Nat- = Zero | Succ Nat- deriving (Eq, Ord)- data Foo a b c d- = A a b c d |- B a b c d |- C a b c d |- D a b c d |- E a b c d |- F a b c d- deriving (Eq, Ord)- type family Equals_0123456789 (a :: Nat) (b :: Nat) :: Bool where- Equals_0123456789 Zero Zero = TrueSym0- Equals_0123456789 (Succ a) (Succ b) = (:==) a b- Equals_0123456789 (a :: Nat) (b :: Nat) = FalseSym0- instance PEq (Proxy :: Proxy Nat) where- type (:==) (a :: Nat) (b :: Nat) = Equals_0123456789 a b- type ZeroSym0 = Zero- type SuccSym1 (t :: Nat) = Succ t- instance SuppressUnusedWarnings SuccSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) SuccSym0KindInference GHC.Tuple.())- data SuccSym0 (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply SuccSym0 arg) ~ KindOf (SuccSym1 arg) =>- SuccSym0KindInference- type instance Apply SuccSym0 l = SuccSym1 l- type family Equals_0123456789 (a :: Foo k k k k)- (b :: Foo k k k k) :: Bool where- Equals_0123456789 (A a a a a) (A b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))- Equals_0123456789 (B a a a a) (B b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))- Equals_0123456789 (C a a a a) (C b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))- Equals_0123456789 (D a a a a) (D b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))- Equals_0123456789 (E a a a a) (E b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))- Equals_0123456789 (F a a a a) (F b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))- Equals_0123456789 (a :: Foo k k k k) (b :: Foo k k k k) = FalseSym0- instance PEq (Proxy :: Proxy (Foo k k k k)) where- type (:==) (a :: Foo k k k k) (b :: Foo k k k k) = Equals_0123456789 a b- type ASym4 (t :: a0123456789)- (t :: b0123456789)- (t :: c0123456789)- (t :: d0123456789) =- A t t t t- instance SuppressUnusedWarnings ASym3 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ASym3KindInference GHC.Tuple.())- data ASym3 (l :: a0123456789)- (l :: b0123456789)- (l :: c0123456789)- (l :: TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789))- = forall arg. KindOf (Apply (ASym3 l l l) arg) ~ KindOf (ASym4 l l l arg) =>- ASym3KindInference- type instance Apply (ASym3 l l l) l = ASym4 l l l l- instance SuppressUnusedWarnings ASym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ASym2KindInference GHC.Tuple.())- data ASym2 (l :: a0123456789)- (l :: b0123456789)- (l :: TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (ASym2 l l) arg) ~ KindOf (ASym3 l l arg) =>- ASym2KindInference- type instance Apply (ASym2 l l) l = ASym3 l l l- instance SuppressUnusedWarnings ASym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ASym1KindInference GHC.Tuple.())- data ASym1 (l :: a0123456789)- (l :: TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (ASym1 l) arg) ~ KindOf (ASym2 l arg) =>- ASym1KindInference- type instance Apply (ASym1 l) l = ASym2 l l- instance SuppressUnusedWarnings ASym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ASym0KindInference GHC.Tuple.())- data ASym0 (l :: TyFun a0123456789 (TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply ASym0 arg) ~ KindOf (ASym1 arg) =>- ASym0KindInference- type instance Apply ASym0 l = ASym1 l- type BSym4 (t :: a0123456789)- (t :: b0123456789)- (t :: c0123456789)- (t :: d0123456789) =- B t t t t- instance SuppressUnusedWarnings BSym3 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BSym3KindInference GHC.Tuple.())- data BSym3 (l :: a0123456789)- (l :: b0123456789)- (l :: c0123456789)- (l :: TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789))- = forall arg. KindOf (Apply (BSym3 l l l) arg) ~ KindOf (BSym4 l l l arg) =>- BSym3KindInference- type instance Apply (BSym3 l l l) l = BSym4 l l l l- instance SuppressUnusedWarnings BSym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BSym2KindInference GHC.Tuple.())- data BSym2 (l :: a0123456789)- (l :: b0123456789)- (l :: TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (BSym2 l l) arg) ~ KindOf (BSym3 l l arg) =>- BSym2KindInference- type instance Apply (BSym2 l l) l = BSym3 l l l- instance SuppressUnusedWarnings BSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BSym1KindInference GHC.Tuple.())- data BSym1 (l :: a0123456789)- (l :: TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (BSym1 l) arg) ~ KindOf (BSym2 l arg) =>- BSym1KindInference- type instance Apply (BSym1 l) l = BSym2 l l- instance SuppressUnusedWarnings BSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BSym0KindInference GHC.Tuple.())- data BSym0 (l :: TyFun a0123456789 (TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply BSym0 arg) ~ KindOf (BSym1 arg) =>- BSym0KindInference- type instance Apply BSym0 l = BSym1 l- type CSym4 (t :: a0123456789)- (t :: b0123456789)- (t :: c0123456789)- (t :: d0123456789) =- C t t t t- instance SuppressUnusedWarnings CSym3 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) CSym3KindInference GHC.Tuple.())- data CSym3 (l :: a0123456789)- (l :: b0123456789)- (l :: c0123456789)- (l :: TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789))- = forall arg. KindOf (Apply (CSym3 l l l) arg) ~ KindOf (CSym4 l l l arg) =>- CSym3KindInference- type instance Apply (CSym3 l l l) l = CSym4 l l l l- instance SuppressUnusedWarnings CSym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) CSym2KindInference GHC.Tuple.())- data CSym2 (l :: a0123456789)- (l :: b0123456789)- (l :: TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (CSym2 l l) arg) ~ KindOf (CSym3 l l arg) =>- CSym2KindInference- type instance Apply (CSym2 l l) l = CSym3 l l l- instance SuppressUnusedWarnings CSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) CSym1KindInference GHC.Tuple.())- data CSym1 (l :: a0123456789)- (l :: TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (CSym1 l) arg) ~ KindOf (CSym2 l arg) =>- CSym1KindInference- type instance Apply (CSym1 l) l = CSym2 l l- instance SuppressUnusedWarnings CSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) CSym0KindInference GHC.Tuple.())- data CSym0 (l :: TyFun a0123456789 (TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply CSym0 arg) ~ KindOf (CSym1 arg) =>- CSym0KindInference- type instance Apply CSym0 l = CSym1 l- type DSym4 (t :: a0123456789)- (t :: b0123456789)- (t :: c0123456789)- (t :: d0123456789) =- D t t t t- instance SuppressUnusedWarnings DSym3 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) DSym3KindInference GHC.Tuple.())- data DSym3 (l :: a0123456789)- (l :: b0123456789)- (l :: c0123456789)- (l :: TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789))- = forall arg. KindOf (Apply (DSym3 l l l) arg) ~ KindOf (DSym4 l l l arg) =>- DSym3KindInference- type instance Apply (DSym3 l l l) l = DSym4 l l l l- instance SuppressUnusedWarnings DSym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) DSym2KindInference GHC.Tuple.())- data DSym2 (l :: a0123456789)- (l :: b0123456789)- (l :: TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (DSym2 l l) arg) ~ KindOf (DSym3 l l arg) =>- DSym2KindInference- type instance Apply (DSym2 l l) l = DSym3 l l l- instance SuppressUnusedWarnings DSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) DSym1KindInference GHC.Tuple.())- data DSym1 (l :: a0123456789)- (l :: TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (DSym1 l) arg) ~ KindOf (DSym2 l arg) =>- DSym1KindInference- type instance Apply (DSym1 l) l = DSym2 l l- instance SuppressUnusedWarnings DSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) DSym0KindInference GHC.Tuple.())- data DSym0 (l :: TyFun a0123456789 (TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply DSym0 arg) ~ KindOf (DSym1 arg) =>- DSym0KindInference- type instance Apply DSym0 l = DSym1 l- type ESym4 (t :: a0123456789)- (t :: b0123456789)- (t :: c0123456789)- (t :: d0123456789) =- E t t t t- instance SuppressUnusedWarnings ESym3 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ESym3KindInference GHC.Tuple.())- data ESym3 (l :: a0123456789)- (l :: b0123456789)- (l :: c0123456789)- (l :: TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789))- = forall arg. KindOf (Apply (ESym3 l l l) arg) ~ KindOf (ESym4 l l l arg) =>- ESym3KindInference- type instance Apply (ESym3 l l l) l = ESym4 l l l l- instance SuppressUnusedWarnings ESym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ESym2KindInference GHC.Tuple.())- data ESym2 (l :: a0123456789)- (l :: b0123456789)- (l :: TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (ESym2 l l) arg) ~ KindOf (ESym3 l l arg) =>- ESym2KindInference- type instance Apply (ESym2 l l) l = ESym3 l l l- instance SuppressUnusedWarnings ESym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ESym1KindInference GHC.Tuple.())- data ESym1 (l :: a0123456789)- (l :: TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (ESym1 l) arg) ~ KindOf (ESym2 l arg) =>- ESym1KindInference- type instance Apply (ESym1 l) l = ESym2 l l- instance SuppressUnusedWarnings ESym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ESym0KindInference GHC.Tuple.())- data ESym0 (l :: TyFun a0123456789 (TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply ESym0 arg) ~ KindOf (ESym1 arg) =>- ESym0KindInference- type instance Apply ESym0 l = ESym1 l- type FSym4 (t :: a0123456789)- (t :: b0123456789)- (t :: c0123456789)- (t :: d0123456789) =- F t t t t- instance SuppressUnusedWarnings FSym3 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FSym3KindInference GHC.Tuple.())- data FSym3 (l :: a0123456789)- (l :: b0123456789)- (l :: c0123456789)- (l :: TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789))- = forall arg. KindOf (Apply (FSym3 l l l) arg) ~ KindOf (FSym4 l l l arg) =>- FSym3KindInference- type instance Apply (FSym3 l l l) l = FSym4 l l l l- instance SuppressUnusedWarnings FSym2 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FSym2KindInference GHC.Tuple.())- data FSym2 (l :: a0123456789)- (l :: b0123456789)- (l :: TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (FSym2 l l) arg) ~ KindOf (FSym3 l l arg) =>- FSym2KindInference- type instance Apply (FSym2 l l) l = FSym3 l l l- instance SuppressUnusedWarnings FSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FSym1KindInference GHC.Tuple.())- data FSym1 (l :: a0123456789)- (l :: TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply (FSym1 l) arg) ~ KindOf (FSym2 l arg) =>- FSym1KindInference- type instance Apply (FSym1 l) l = FSym2 l l- instance SuppressUnusedWarnings FSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FSym0KindInference GHC.Tuple.())- data FSym0 (l :: TyFun a0123456789 (TyFun b0123456789 (TyFun c0123456789 (TyFun d0123456789 (Foo a0123456789 b0123456789 c0123456789 d0123456789)- -> GHC.Types.Type)- -> GHC.Types.Type)- -> GHC.Types.Type))- = forall arg. KindOf (Apply FSym0 arg) ~ KindOf (FSym1 arg) =>- FSym0KindInference- type instance Apply FSym0 l = FSym1 l- type family Compare_0123456789 (a :: Nat)- (a :: Nat) :: Ordering where- Compare_0123456789 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]- Compare_0123456789 (Succ a_0123456789) (Succ b_0123456789) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) '[])- Compare_0123456789 Zero (Succ _z_0123456789) = LTSym0- Compare_0123456789 (Succ _z_0123456789) Zero = GTSym0- type Compare_0123456789Sym2 (t :: Nat) (t :: Nat) =- Compare_0123456789 t t- instance SuppressUnusedWarnings Compare_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Compare_0123456789Sym1KindInference GHC.Tuple.())- data Compare_0123456789Sym1 (l :: Nat) (l :: TyFun Nat Ordering)- = forall arg. KindOf (Apply (Compare_0123456789Sym1 l) arg) ~ KindOf (Compare_0123456789Sym2 l arg) =>- Compare_0123456789Sym1KindInference- type instance Apply (Compare_0123456789Sym1 l) l = Compare_0123456789Sym2 l l- instance SuppressUnusedWarnings Compare_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Compare_0123456789Sym0KindInference GHC.Tuple.())- data Compare_0123456789Sym0 (l :: TyFun Nat (TyFun Nat Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply Compare_0123456789Sym0 arg) ~ KindOf (Compare_0123456789Sym1 arg) =>- Compare_0123456789Sym0KindInference- type instance Apply Compare_0123456789Sym0 l = Compare_0123456789Sym1 l- instance POrd (Proxy :: Proxy Nat) where- type Compare (a :: Nat) (a :: Nat) = Apply (Apply Compare_0123456789Sym0 a) a- type family Compare_0123456789 (a :: Foo a b c d)- (a :: Foo a b c d) :: Ordering where- Compare_0123456789 (A a_0123456789 a_0123456789 a_0123456789 a_0123456789) (A b_0123456789 b_0123456789 b_0123456789 b_0123456789) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) '[]))))- Compare_0123456789 (B a_0123456789 a_0123456789 a_0123456789 a_0123456789) (B b_0123456789 b_0123456789 b_0123456789 b_0123456789) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) '[]))))- Compare_0123456789 (C a_0123456789 a_0123456789 a_0123456789 a_0123456789) (C b_0123456789 b_0123456789 b_0123456789 b_0123456789) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) '[]))))- Compare_0123456789 (D a_0123456789 a_0123456789 a_0123456789 a_0123456789) (D b_0123456789 b_0123456789 b_0123456789 b_0123456789) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) '[]))))- Compare_0123456789 (E a_0123456789 a_0123456789 a_0123456789 a_0123456789) (E b_0123456789 b_0123456789 b_0123456789 b_0123456789) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) '[]))))- Compare_0123456789 (F a_0123456789 a_0123456789 a_0123456789 a_0123456789) (F b_0123456789 b_0123456789 b_0123456789 b_0123456789) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) '[]))))- Compare_0123456789 (A _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (B _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (A _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (C _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (A _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (D _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (A _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (E _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (A _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (F _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (B _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (A _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (B _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (C _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (B _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (D _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (B _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (E _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (B _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (F _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (C _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (A _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (C _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (B _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (C _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (D _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (C _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (E _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (C _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (F _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (D _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (A _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (D _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (B _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (D _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (C _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (D _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (E _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (D _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (F _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (E _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (A _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (E _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (B _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (E _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (C _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (E _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (D _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (E _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (F _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (F _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (A _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (F _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (B _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (F _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (C _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (F _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (D _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- Compare_0123456789 (F _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) (E _z_0123456789 _z_0123456789 _z_0123456789 _z_0123456789) = GTSym0- type Compare_0123456789Sym2 (t :: Foo a0123456789 b0123456789 c0123456789 d0123456789)- (t :: Foo a0123456789 b0123456789 c0123456789 d0123456789) =- Compare_0123456789 t t- instance SuppressUnusedWarnings Compare_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Compare_0123456789Sym1KindInference GHC.Tuple.())- data Compare_0123456789Sym1 (l :: Foo a0123456789 b0123456789 c0123456789 d0123456789)- (l :: TyFun (Foo a0123456789 b0123456789 c0123456789 d0123456789) Ordering)- = forall arg. KindOf (Apply (Compare_0123456789Sym1 l) arg) ~ KindOf (Compare_0123456789Sym2 l arg) =>- Compare_0123456789Sym1KindInference- type instance Apply (Compare_0123456789Sym1 l) l = Compare_0123456789Sym2 l l- instance SuppressUnusedWarnings Compare_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Compare_0123456789Sym0KindInference GHC.Tuple.())- data Compare_0123456789Sym0 (l :: TyFun (Foo a0123456789 b0123456789 c0123456789 d0123456789) (TyFun (Foo a0123456789 b0123456789 c0123456789 d0123456789) Ordering- -> GHC.Types.Type))- = forall arg. KindOf (Apply Compare_0123456789Sym0 arg) ~ KindOf (Compare_0123456789Sym1 arg) =>- Compare_0123456789Sym0KindInference- type instance Apply Compare_0123456789Sym0 l = Compare_0123456789Sym1 l- instance POrd (Proxy :: Proxy (Foo a b c d)) where- type Compare (a :: Foo a b c d) (a :: Foo a b c d) = Apply (Apply Compare_0123456789Sym0 a) a- data instance Sing (z :: Nat)- = z ~ Zero => SZero |- forall (n :: Nat). z ~ Succ n => SSucc (Sing (n :: Nat))- type SNat = (Sing :: Nat -> GHC.Types.Type)- instance SingKind Nat where- type DemoteRep Nat = Nat- fromSing SZero = Zero- fromSing (SSucc b) = Succ (fromSing b)- toSing Zero = SomeSing SZero- toSing (Succ b)- = case toSing b :: SomeSing Nat of {- SomeSing c -> SomeSing (SSucc c) }- instance SEq Nat where- (%:==) SZero SZero = STrue- (%:==) SZero (SSucc _) = SFalse- (%:==) (SSucc _) SZero = SFalse- (%:==) (SSucc a) (SSucc b) = (%:==) a b- instance SDecide Nat where- (%~) SZero SZero = Proved Refl- (%~) SZero (SSucc _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SSucc _) SZero- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SSucc a) (SSucc b)- = case (%~) a b of {- Proved Refl -> Proved Refl- Disproved contra- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- data instance Sing (z :: Foo a b c d)- = forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ A n n n n =>- SA (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d)) |- forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ B n n n n =>- SB (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d)) |- forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ C n n n n =>- SC (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d)) |- forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ D n n n n =>- SD (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d)) |- forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ E n n n n =>- SE (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d)) |- forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ F n n n n =>- SF (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d))- type SFoo = (Sing :: Foo a b c d -> GHC.Types.Type)- instance (SingKind a, SingKind b, SingKind c, SingKind d) =>- SingKind (Foo a b c d) where- type DemoteRep (Foo a b c d) = Foo (DemoteRep a) (DemoteRep b) (DemoteRep c) (DemoteRep d)- fromSing (SA b b b b)- = A (fromSing b) (fromSing b) (fromSing b) (fromSing b)- fromSing (SB b b b b)- = B (fromSing b) (fromSing b) (fromSing b) (fromSing b)- fromSing (SC b b b b)- = C (fromSing b) (fromSing b) (fromSing b) (fromSing b)- fromSing (SD b b b b)- = D (fromSing b) (fromSing b) (fromSing b) (fromSing b)- fromSing (SE b b b b)- = E (fromSing b) (fromSing b) (fromSing b) (fromSing b)- fromSing (SF b b b b)- = F (fromSing b) (fromSing b) (fromSing b) (fromSing b)- toSing (A b b b b)- = case- GHC.Tuple.(,,,)- (toSing b :: SomeSing a)- (toSing b :: SomeSing b)- (toSing b :: SomeSing c)- (toSing b :: SomeSing d)- of {- GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)- -> SomeSing (SA c c c c) }- toSing (B b b b b)- = case- GHC.Tuple.(,,,)- (toSing b :: SomeSing a)- (toSing b :: SomeSing b)- (toSing b :: SomeSing c)- (toSing b :: SomeSing d)- of {- GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)- -> SomeSing (SB c c c c) }- toSing (C b b b b)- = case- GHC.Tuple.(,,,)- (toSing b :: SomeSing a)- (toSing b :: SomeSing b)- (toSing b :: SomeSing c)- (toSing b :: SomeSing d)- of {- GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)- -> SomeSing (SC c c c c) }- toSing (D b b b b)- = case- GHC.Tuple.(,,,)- (toSing b :: SomeSing a)- (toSing b :: SomeSing b)- (toSing b :: SomeSing c)- (toSing b :: SomeSing d)- of {- GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)- -> SomeSing (SD c c c c) }- toSing (E b b b b)- = case- GHC.Tuple.(,,,)- (toSing b :: SomeSing a)- (toSing b :: SomeSing b)- (toSing b :: SomeSing c)- (toSing b :: SomeSing d)- of {- GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)- -> SomeSing (SE c c c c) }- toSing (F b b b b)- = case- GHC.Tuple.(,,,)- (toSing b :: SomeSing a)- (toSing b :: SomeSing b)- (toSing b :: SomeSing c)- (toSing b :: SomeSing d)- of {- GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)- -> SomeSing (SF c c c c) }- instance (SEq a, SEq b, SEq c, SEq d) => SEq (Foo a b c d) where- (%:==) (SA a a a a) (SA b b b b)- = (%:&&)- ((%:==) a b)- ((%:&&) ((%:==) a b) ((%:&&) ((%:==) a b) ((%:==) a b)))- (%:==) (SA _ _ _ _) (SB _ _ _ _) = SFalse- (%:==) (SA _ _ _ _) (SC _ _ _ _) = SFalse- (%:==) (SA _ _ _ _) (SD _ _ _ _) = SFalse- (%:==) (SA _ _ _ _) (SE _ _ _ _) = SFalse- (%:==) (SA _ _ _ _) (SF _ _ _ _) = SFalse- (%:==) (SB _ _ _ _) (SA _ _ _ _) = SFalse- (%:==) (SB a a a a) (SB b b b b)- = (%:&&)- ((%:==) a b)- ((%:&&) ((%:==) a b) ((%:&&) ((%:==) a b) ((%:==) a b)))- (%:==) (SB _ _ _ _) (SC _ _ _ _) = SFalse- (%:==) (SB _ _ _ _) (SD _ _ _ _) = SFalse- (%:==) (SB _ _ _ _) (SE _ _ _ _) = SFalse- (%:==) (SB _ _ _ _) (SF _ _ _ _) = SFalse- (%:==) (SC _ _ _ _) (SA _ _ _ _) = SFalse- (%:==) (SC _ _ _ _) (SB _ _ _ _) = SFalse- (%:==) (SC a a a a) (SC b b b b)- = (%:&&)- ((%:==) a b)- ((%:&&) ((%:==) a b) ((%:&&) ((%:==) a b) ((%:==) a b)))- (%:==) (SC _ _ _ _) (SD _ _ _ _) = SFalse- (%:==) (SC _ _ _ _) (SE _ _ _ _) = SFalse- (%:==) (SC _ _ _ _) (SF _ _ _ _) = SFalse- (%:==) (SD _ _ _ _) (SA _ _ _ _) = SFalse- (%:==) (SD _ _ _ _) (SB _ _ _ _) = SFalse- (%:==) (SD _ _ _ _) (SC _ _ _ _) = SFalse- (%:==) (SD a a a a) (SD b b b b)- = (%:&&)- ((%:==) a b)- ((%:&&) ((%:==) a b) ((%:&&) ((%:==) a b) ((%:==) a b)))- (%:==) (SD _ _ _ _) (SE _ _ _ _) = SFalse- (%:==) (SD _ _ _ _) (SF _ _ _ _) = SFalse- (%:==) (SE _ _ _ _) (SA _ _ _ _) = SFalse- (%:==) (SE _ _ _ _) (SB _ _ _ _) = SFalse- (%:==) (SE _ _ _ _) (SC _ _ _ _) = SFalse- (%:==) (SE _ _ _ _) (SD _ _ _ _) = SFalse- (%:==) (SE a a a a) (SE b b b b)- = (%:&&)- ((%:==) a b)- ((%:&&) ((%:==) a b) ((%:&&) ((%:==) a b) ((%:==) a b)))- (%:==) (SE _ _ _ _) (SF _ _ _ _) = SFalse- (%:==) (SF _ _ _ _) (SA _ _ _ _) = SFalse- (%:==) (SF _ _ _ _) (SB _ _ _ _) = SFalse- (%:==) (SF _ _ _ _) (SC _ _ _ _) = SFalse- (%:==) (SF _ _ _ _) (SD _ _ _ _) = SFalse- (%:==) (SF _ _ _ _) (SE _ _ _ _) = SFalse- (%:==) (SF a a a a) (SF b b b b)- = (%:&&)- ((%:==) a b)- ((%:&&) ((%:==) a b) ((%:&&) ((%:==) a b) ((%:==) a b)))- instance (SDecide a, SDecide b, SDecide c, SDecide d) =>- SDecide (Foo a b c d) where- (%~) (SA a a a a) (SA b b b b)- = case- GHC.Tuple.(,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b)- of {- GHC.Tuple.(,,,) (Proved Refl)- (Proved Refl)- (Proved Refl)- (Proved Refl)- -> Proved Refl- GHC.Tuple.(,,,) (Disproved contra) _ _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ (Disproved contra) _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ (Disproved contra) _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ _ (Disproved contra)- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- (%~) (SA _ _ _ _) (SB _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SA _ _ _ _) (SC _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SA _ _ _ _) (SD _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SA _ _ _ _) (SE _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SA _ _ _ _) (SF _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SB _ _ _ _) (SA _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SB a a a a) (SB b b b b)- = case- GHC.Tuple.(,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b)- of {- GHC.Tuple.(,,,) (Proved Refl)- (Proved Refl)- (Proved Refl)- (Proved Refl)- -> Proved Refl- GHC.Tuple.(,,,) (Disproved contra) _ _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ (Disproved contra) _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ (Disproved contra) _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ _ (Disproved contra)- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- (%~) (SB _ _ _ _) (SC _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SB _ _ _ _) (SD _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SB _ _ _ _) (SE _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SB _ _ _ _) (SF _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SC _ _ _ _) (SA _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SC _ _ _ _) (SB _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SC a a a a) (SC b b b b)- = case- GHC.Tuple.(,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b)- of {- GHC.Tuple.(,,,) (Proved Refl)- (Proved Refl)- (Proved Refl)- (Proved Refl)- -> Proved Refl- GHC.Tuple.(,,,) (Disproved contra) _ _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ (Disproved contra) _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ (Disproved contra) _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ _ (Disproved contra)- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- (%~) (SC _ _ _ _) (SD _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SC _ _ _ _) (SE _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SC _ _ _ _) (SF _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SD _ _ _ _) (SA _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SD _ _ _ _) (SB _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SD _ _ _ _) (SC _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SD a a a a) (SD b b b b)- = case- GHC.Tuple.(,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b)- of {- GHC.Tuple.(,,,) (Proved Refl)- (Proved Refl)- (Proved Refl)- (Proved Refl)- -> Proved Refl- GHC.Tuple.(,,,) (Disproved contra) _ _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ (Disproved contra) _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ (Disproved contra) _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ _ (Disproved contra)- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- (%~) (SD _ _ _ _) (SE _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SD _ _ _ _) (SF _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SE _ _ _ _) (SA _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SE _ _ _ _) (SB _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SE _ _ _ _) (SC _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SE _ _ _ _) (SD _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SE a a a a) (SE b b b b)- = case- GHC.Tuple.(,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b)- of {- GHC.Tuple.(,,,) (Proved Refl)- (Proved Refl)- (Proved Refl)- (Proved Refl)- -> Proved Refl- GHC.Tuple.(,,,) (Disproved contra) _ _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ (Disproved contra) _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ (Disproved contra) _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ _ (Disproved contra)- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- (%~) (SE _ _ _ _) (SF _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SF _ _ _ _) (SA _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SF _ _ _ _) (SB _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SF _ _ _ _) (SC _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SF _ _ _ _) (SD _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SF _ _ _ _) (SE _ _ _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SF a a a a) (SF b b b b)- = case- GHC.Tuple.(,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b)- of {- GHC.Tuple.(,,,) (Proved Refl)- (Proved Refl)- (Proved Refl)- (Proved Refl)- -> Proved Refl- GHC.Tuple.(,,,) (Disproved contra) _ _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ (Disproved contra) _ _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ (Disproved contra) _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,,,) _ _ _ (Disproved contra)- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- instance SOrd Nat => SOrd Nat where- sCompare ::- forall (t0 :: Nat) (t1 :: Nat).- Sing t0- -> Sing t1- -> Sing (Apply (Apply (CompareSym0 :: TyFun Nat (TyFun Nat Ordering- -> GHC.Types.Type)- -> GHC.Types.Type) t0 :: TyFun Nat Ordering- -> GHC.Types.Type) t1 :: Ordering)- sCompare SZero SZero- = let- lambda ::- (t0 ~ ZeroSym0, t1 ~ ZeroSym0) =>- Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- SNil- in lambda- sCompare (SSucc sA_0123456789) (SSucc sB_0123456789)- = let- lambda ::- forall a_0123456789 b_0123456789.- (t0 ~ Apply SuccSym0 a_0123456789,- t1 ~ Apply SuccSym0 b_0123456789) =>- Sing a_0123456789- -> Sing b_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda a_0123456789 b_0123456789- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- SNil)- in lambda sA_0123456789 sB_0123456789- sCompare SZero (SSucc _s_z_0123456789)- = let- lambda ::- forall _z_0123456789.- (t0 ~ ZeroSym0, t1 ~ Apply SuccSym0 _z_0123456789) =>- Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SLT- in lambda _s_z_0123456789- sCompare (SSucc _s_z_0123456789) SZero- = let- lambda ::- forall _z_0123456789.- (t0 ~ Apply SuccSym0 _z_0123456789, t1 ~ ZeroSym0) =>- Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SGT- in lambda _s_z_0123456789- instance (SOrd a, SOrd b, SOrd c, SOrd d) =>- SOrd (Foo a b c d) where- sCompare ::- forall (t0 :: Foo a b c d) (t1 :: Foo a b c d).- Sing t0- -> Sing t1- -> Sing (Apply (Apply (CompareSym0 :: TyFun (Foo a b c d) (TyFun (Foo a b c d) Ordering- -> GHC.Types.Type)- -> GHC.Types.Type) t0 :: TyFun (Foo a b c d) Ordering- -> GHC.Types.Type) t1 :: Ordering)- sCompare- (SA sA_0123456789 sA_0123456789 sA_0123456789 sA_0123456789)- (SA sB_0123456789 sB_0123456789 sB_0123456789 sB_0123456789)- = let- lambda ::- forall a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ASym0 a_0123456789) a_0123456789) a_0123456789) a_0123456789,- t1 ~ Apply (Apply (Apply (Apply ASym0 b_0123456789) b_0123456789) b_0123456789) b_0123456789) =>- Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare)- a_0123456789)- b_0123456789))- SNil))))- in- lambda- sA_0123456789- sA_0123456789- sA_0123456789- sA_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sCompare- (SB sA_0123456789 sA_0123456789 sA_0123456789 sA_0123456789)- (SB sB_0123456789 sB_0123456789 sB_0123456789 sB_0123456789)- = let- lambda ::- forall a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789.- (t0 ~ Apply (Apply (Apply (Apply BSym0 a_0123456789) a_0123456789) a_0123456789) a_0123456789,- t1 ~ Apply (Apply (Apply (Apply BSym0 b_0123456789) b_0123456789) b_0123456789) b_0123456789) =>- Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare)- a_0123456789)- b_0123456789))- SNil))))- in- lambda- sA_0123456789- sA_0123456789- sA_0123456789- sA_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sCompare- (SC sA_0123456789 sA_0123456789 sA_0123456789 sA_0123456789)- (SC sB_0123456789 sB_0123456789 sB_0123456789 sB_0123456789)- = let- lambda ::- forall a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789.- (t0 ~ Apply (Apply (Apply (Apply CSym0 a_0123456789) a_0123456789) a_0123456789) a_0123456789,- t1 ~ Apply (Apply (Apply (Apply CSym0 b_0123456789) b_0123456789) b_0123456789) b_0123456789) =>- Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare)- a_0123456789)- b_0123456789))- SNil))))- in- lambda- sA_0123456789- sA_0123456789- sA_0123456789- sA_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sCompare- (SD sA_0123456789 sA_0123456789 sA_0123456789 sA_0123456789)- (SD sB_0123456789 sB_0123456789 sB_0123456789 sB_0123456789)- = let- lambda ::- forall a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789.- (t0 ~ Apply (Apply (Apply (Apply DSym0 a_0123456789) a_0123456789) a_0123456789) a_0123456789,- t1 ~ Apply (Apply (Apply (Apply DSym0 b_0123456789) b_0123456789) b_0123456789) b_0123456789) =>- Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare)- a_0123456789)- b_0123456789))- SNil))))- in- lambda- sA_0123456789- sA_0123456789- sA_0123456789- sA_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sCompare- (SE sA_0123456789 sA_0123456789 sA_0123456789 sA_0123456789)- (SE sB_0123456789 sB_0123456789 sB_0123456789 sB_0123456789)- = let- lambda ::- forall a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ESym0 a_0123456789) a_0123456789) a_0123456789) a_0123456789,- t1 ~ Apply (Apply (Apply (Apply ESym0 b_0123456789) b_0123456789) b_0123456789) b_0123456789) =>- Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare)- a_0123456789)- b_0123456789))- SNil))))- in- lambda- sA_0123456789- sA_0123456789- sA_0123456789- sA_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sCompare- (SF sA_0123456789 sA_0123456789 sA_0123456789 sA_0123456789)- (SF sB_0123456789 sB_0123456789 sB_0123456789 sB_0123456789)- = let- lambda ::- forall a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789.- (t0 ~ Apply (Apply (Apply (Apply FSym0 a_0123456789) a_0123456789) a_0123456789) a_0123456789,- t1 ~ Apply (Apply (Apply (Apply FSym0 b_0123456789) b_0123456789) b_0123456789) b_0123456789) =>- Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing a_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- a_0123456789- a_0123456789- a_0123456789- a_0123456789- b_0123456789- b_0123456789- b_0123456789- b_0123456789- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare)- a_0123456789)- b_0123456789))- SNil))))- in- lambda- sA_0123456789- sA_0123456789- sA_0123456789- sA_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sB_0123456789- sCompare- (SA _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SB _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ASym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply BSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SA _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SC _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ASym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply CSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SA _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SD _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ASym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply DSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SA _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SE _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ASym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply ESym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SA _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SF _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ASym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply FSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SB _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SA _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply BSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply ASym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SB _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SC _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply BSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply CSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SB _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SD _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply BSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply DSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SB _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SE _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply BSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply ESym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SB _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SF _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply BSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply FSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SC _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SA _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply CSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply ASym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SC _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SB _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply CSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply BSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SC _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SD _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply CSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply DSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SC _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SE _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply CSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply ESym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SC _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SF _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply CSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply FSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SD _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SA _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply DSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply ASym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SD _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SB _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply DSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply BSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SD _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SC _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply DSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply CSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SD _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SE _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply DSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply ESym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SD _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SF _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply DSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply FSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SE _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SA _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ESym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply ASym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SE _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SB _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ESym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply BSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SE _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SC _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ESym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply CSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SE _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SD _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ESym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply DSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SE _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SF _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply ESym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply FSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SLT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SF _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SA _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply FSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply ASym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SF _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SB _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply FSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply BSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SF _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SC _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply FSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply CSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SF _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SD _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply FSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply DSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- sCompare- (SF _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- (SE _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789)- = let- lambda ::- forall _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789.- (t0 ~ Apply (Apply (Apply (Apply FSym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789,- t1 ~ Apply (Apply (Apply (Apply ESym0 _z_0123456789) _z_0123456789) _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- _z_0123456789- = SGT- in- lambda- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- _s_z_0123456789- instance SingI Zero where- sing = SZero- instance SingI n => SingI (Succ (n :: Nat)) where- sing = SSucc sing- instance (SingI n, SingI n, SingI n, SingI n) =>- SingI (A (n :: a) (n :: b) (n :: c) (n :: d)) where- sing = SA sing sing sing sing- instance (SingI n, SingI n, SingI n, SingI n) =>- SingI (B (n :: a) (n :: b) (n :: c) (n :: d)) where- sing = SB sing sing sing sing- instance (SingI n, SingI n, SingI n, SingI n) =>- SingI (C (n :: a) (n :: b) (n :: c) (n :: d)) where- sing = SC sing sing sing sing- instance (SingI n, SingI n, SingI n, SingI n) =>- SingI (D (n :: a) (n :: b) (n :: c) (n :: d)) where- sing = SD sing sing sing sing- instance (SingI n, SingI n, SingI n, SingI n) =>- SingI (E (n :: a) (n :: b) (n :: c) (n :: d)) where- sing = SE sing sing sing sing- instance (SingI n, SingI n, SingI n, SingI n) =>- SingI (F (n :: a) (n :: b) (n :: c) (n :: d)) where- sing = SF sing sing sing sing
+ tests/compile-and-dump/Singletons/OrdDeriving.ghc82.template view
@@ -0,0 +1,1109 @@+Singletons/OrdDeriving.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| data Nat+ = Zero | Succ Nat+ deriving (Eq, Ord)+ data Foo a b c d+ = A a b c d |+ B a b c d |+ C a b c d |+ D a b c d |+ E a b c d |+ F a b c d+ deriving (Eq, Ord) |]+ ======>+ data Nat+ = Zero | Succ Nat+ deriving (Eq, Ord)+ data Foo a b c d+ = A a b c d |+ B a b c d |+ C a b c d |+ D a b c d |+ E a b c d |+ F a b c d+ deriving (Eq, Ord)+ type family Equals_0123456789876543210 (a :: Nat) (b :: Nat) :: Bool where+ Equals_0123456789876543210 Zero Zero = TrueSym0+ Equals_0123456789876543210 (Succ a) (Succ b) = (:==) a b+ Equals_0123456789876543210 (a :: Nat) (b :: Nat) = FalseSym0+ instance PEq Nat where+ type (:==) (a :: Nat) (b :: Nat) = Equals_0123456789876543210 a b+ type ZeroSym0 = Zero+ type SuccSym1 (t :: Nat) = Succ t+ instance SuppressUnusedWarnings SuccSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) SuccSym0KindInference) GHC.Tuple.())+ data SuccSym0 (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>+ SuccSym0KindInference+ type instance Apply SuccSym0 l = Succ l+ type family Equals_0123456789876543210 (a :: Foo k k k k) (b :: Foo k k k k) :: Bool where+ Equals_0123456789876543210 (A a a a a) (A b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))+ Equals_0123456789876543210 (B a a a a) (B b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))+ Equals_0123456789876543210 (C a a a a) (C b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))+ Equals_0123456789876543210 (D a a a a) (D b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))+ Equals_0123456789876543210 (E a a a a) (E b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))+ Equals_0123456789876543210 (F a a a a) (F b b b b) = (:&&) ((:==) a b) ((:&&) ((:==) a b) ((:&&) ((:==) a b) ((:==) a b)))+ Equals_0123456789876543210 (a :: Foo k k k k) (b :: Foo k k k k) = FalseSym0+ instance PEq (Foo k k k k) where+ type (:==) (a :: Foo k k k k) (b :: Foo k k k k) = Equals_0123456789876543210 a b+ type ASym4 (t :: a0123456789876543210) (t :: b0123456789876543210) (t :: c0123456789876543210) (t :: d0123456789876543210) =+ A t t t t+ instance SuppressUnusedWarnings ASym3 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ASym3KindInference) GHC.Tuple.())+ data ASym3 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: c0123456789876543210) (l :: TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))+ = forall arg. SameKind (Apply (ASym3 l l l) arg) (ASym4 l l l arg) =>+ ASym3KindInference+ type instance Apply (ASym3 l l l) l = A l l l l+ instance SuppressUnusedWarnings ASym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ASym2KindInference) GHC.Tuple.())+ data ASym2 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (ASym2 l l) arg) (ASym3 l l arg) =>+ ASym2KindInference+ type instance Apply (ASym2 l l) l = ASym3 l l l+ instance SuppressUnusedWarnings ASym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ASym1KindInference) GHC.Tuple.())+ data ASym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (ASym1 l) arg) (ASym2 l arg) =>+ ASym1KindInference+ type instance Apply (ASym1 l) l = ASym2 l l+ instance SuppressUnusedWarnings ASym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ASym0KindInference) GHC.Tuple.())+ data ASym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply ASym0 arg) (ASym1 arg) =>+ ASym0KindInference+ type instance Apply ASym0 l = ASym1 l+ type BSym4 (t :: a0123456789876543210) (t :: b0123456789876543210) (t :: c0123456789876543210) (t :: d0123456789876543210) =+ B t t t t+ instance SuppressUnusedWarnings BSym3 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BSym3KindInference) GHC.Tuple.())+ data BSym3 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: c0123456789876543210) (l :: TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))+ = forall arg. SameKind (Apply (BSym3 l l l) arg) (BSym4 l l l arg) =>+ BSym3KindInference+ type instance Apply (BSym3 l l l) l = B l l l l+ instance SuppressUnusedWarnings BSym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BSym2KindInference) GHC.Tuple.())+ data BSym2 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (BSym2 l l) arg) (BSym3 l l arg) =>+ BSym2KindInference+ type instance Apply (BSym2 l l) l = BSym3 l l l+ instance SuppressUnusedWarnings BSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BSym1KindInference) GHC.Tuple.())+ data BSym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (BSym1 l) arg) (BSym2 l arg) =>+ BSym1KindInference+ type instance Apply (BSym1 l) l = BSym2 l l+ instance SuppressUnusedWarnings BSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BSym0KindInference) GHC.Tuple.())+ data BSym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply BSym0 arg) (BSym1 arg) =>+ BSym0KindInference+ type instance Apply BSym0 l = BSym1 l+ type CSym4 (t :: a0123456789876543210) (t :: b0123456789876543210) (t :: c0123456789876543210) (t :: d0123456789876543210) =+ C t t t t+ instance SuppressUnusedWarnings CSym3 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) CSym3KindInference) GHC.Tuple.())+ data CSym3 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: c0123456789876543210) (l :: TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))+ = forall arg. SameKind (Apply (CSym3 l l l) arg) (CSym4 l l l arg) =>+ CSym3KindInference+ type instance Apply (CSym3 l l l) l = C l l l l+ instance SuppressUnusedWarnings CSym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) CSym2KindInference) GHC.Tuple.())+ data CSym2 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (CSym2 l l) arg) (CSym3 l l arg) =>+ CSym2KindInference+ type instance Apply (CSym2 l l) l = CSym3 l l l+ instance SuppressUnusedWarnings CSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) CSym1KindInference) GHC.Tuple.())+ data CSym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (CSym1 l) arg) (CSym2 l arg) =>+ CSym1KindInference+ type instance Apply (CSym1 l) l = CSym2 l l+ instance SuppressUnusedWarnings CSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) CSym0KindInference) GHC.Tuple.())+ data CSym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply CSym0 arg) (CSym1 arg) =>+ CSym0KindInference+ type instance Apply CSym0 l = CSym1 l+ type DSym4 (t :: a0123456789876543210) (t :: b0123456789876543210) (t :: c0123456789876543210) (t :: d0123456789876543210) =+ D t t t t+ instance SuppressUnusedWarnings DSym3 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) DSym3KindInference) GHC.Tuple.())+ data DSym3 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: c0123456789876543210) (l :: TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))+ = forall arg. SameKind (Apply (DSym3 l l l) arg) (DSym4 l l l arg) =>+ DSym3KindInference+ type instance Apply (DSym3 l l l) l = D l l l l+ instance SuppressUnusedWarnings DSym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) DSym2KindInference) GHC.Tuple.())+ data DSym2 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (DSym2 l l) arg) (DSym3 l l arg) =>+ DSym2KindInference+ type instance Apply (DSym2 l l) l = DSym3 l l l+ instance SuppressUnusedWarnings DSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) DSym1KindInference) GHC.Tuple.())+ data DSym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (DSym1 l) arg) (DSym2 l arg) =>+ DSym1KindInference+ type instance Apply (DSym1 l) l = DSym2 l l+ instance SuppressUnusedWarnings DSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) DSym0KindInference) GHC.Tuple.())+ data DSym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply DSym0 arg) (DSym1 arg) =>+ DSym0KindInference+ type instance Apply DSym0 l = DSym1 l+ type ESym4 (t :: a0123456789876543210) (t :: b0123456789876543210) (t :: c0123456789876543210) (t :: d0123456789876543210) =+ E t t t t+ instance SuppressUnusedWarnings ESym3 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ESym3KindInference) GHC.Tuple.())+ data ESym3 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: c0123456789876543210) (l :: TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))+ = forall arg. SameKind (Apply (ESym3 l l l) arg) (ESym4 l l l arg) =>+ ESym3KindInference+ type instance Apply (ESym3 l l l) l = E l l l l+ instance SuppressUnusedWarnings ESym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ESym2KindInference) GHC.Tuple.())+ data ESym2 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (ESym2 l l) arg) (ESym3 l l arg) =>+ ESym2KindInference+ type instance Apply (ESym2 l l) l = ESym3 l l l+ instance SuppressUnusedWarnings ESym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ESym1KindInference) GHC.Tuple.())+ data ESym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (ESym1 l) arg) (ESym2 l arg) =>+ ESym1KindInference+ type instance Apply (ESym1 l) l = ESym2 l l+ instance SuppressUnusedWarnings ESym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ESym0KindInference) GHC.Tuple.())+ data ESym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply ESym0 arg) (ESym1 arg) =>+ ESym0KindInference+ type instance Apply ESym0 l = ESym1 l+ type FSym4 (t :: a0123456789876543210) (t :: b0123456789876543210) (t :: c0123456789876543210) (t :: d0123456789876543210) =+ F t t t t+ instance SuppressUnusedWarnings FSym3 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FSym3KindInference) GHC.Tuple.())+ data FSym3 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: c0123456789876543210) (l :: TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))+ = forall arg. SameKind (Apply (FSym3 l l l) arg) (FSym4 l l l arg) =>+ FSym3KindInference+ type instance Apply (FSym3 l l l) l = F l l l l+ instance SuppressUnusedWarnings FSym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FSym2KindInference) GHC.Tuple.())+ data FSym2 (l :: a0123456789876543210) (l :: b0123456789876543210) (l :: TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (FSym2 l l) arg) (FSym3 l l arg) =>+ FSym2KindInference+ type instance Apply (FSym2 l l) l = FSym3 l l l+ instance SuppressUnusedWarnings FSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FSym1KindInference) GHC.Tuple.())+ data FSym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (FSym1 l) arg) (FSym2 l arg) =>+ FSym1KindInference+ type instance Apply (FSym1 l) l = FSym2 l l+ instance SuppressUnusedWarnings FSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FSym0KindInference) GHC.Tuple.())+ data FSym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 (TyFun c0123456789876543210 (TyFun d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)+ -> GHC.Types.Type)+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>+ FSym0KindInference+ type instance Apply FSym0 l = FSym1 l+ type family Compare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where+ Compare_0123456789876543210 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]+ Compare_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])+ Compare_0123456789876543210 Zero (Succ _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (Succ _z_0123456789876543210) Zero = GTSym0+ type Compare_0123456789876543210Sym2 (t :: Nat) (t :: Nat) =+ Compare_0123456789876543210 t t+ instance SuppressUnusedWarnings Compare_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym1 (l :: Nat) (l :: TyFun Nat Ordering)+ = forall arg. SameKind (Apply (Compare_0123456789876543210Sym1 l) arg) (Compare_0123456789876543210Sym2 l arg) =>+ Compare_0123456789876543210Sym1KindInference+ type instance Apply (Compare_0123456789876543210Sym1 l) l = Compare_0123456789876543210 l l+ instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym0 (l :: TyFun Nat (TyFun Nat Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>+ Compare_0123456789876543210Sym0KindInference+ type instance Apply Compare_0123456789876543210Sym0 l = Compare_0123456789876543210Sym1 l+ instance POrd Nat where+ type Compare (a :: Nat) (a :: Nat) = Apply (Apply Compare_0123456789876543210Sym0 a) a+ type family Compare_0123456789876543210 (a :: Foo a b c d) (a :: Foo a b c d) :: Ordering where+ Compare_0123456789876543210 (A a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (A b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))+ Compare_0123456789876543210 (B a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (B b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))+ Compare_0123456789876543210 (C a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (C b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))+ Compare_0123456789876543210 (D a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (D b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))+ Compare_0123456789876543210 (E a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (E b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))+ Compare_0123456789876543210 (F a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (F b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))+ Compare_0123456789876543210 (A _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (B _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (A _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (C _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (A _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (D _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (A _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (E _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (A _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (F _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (B _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (A _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (B _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (C _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (B _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (D _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (B _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (E _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (B _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (F _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (C _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (A _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (C _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (B _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (C _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (D _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (C _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (E _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (C _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (F _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (D _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (A _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (D _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (B _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (D _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (C _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (D _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (E _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (D _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (F _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (E _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (A _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (E _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (B _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (E _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (C _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (E _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (D _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (E _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (F _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (F _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (A _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (F _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (B _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (F _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (C _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (F _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (D _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ Compare_0123456789876543210 (F _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) (E _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210 _z_0123456789876543210) = GTSym0+ type Compare_0123456789876543210Sym2 (t :: Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) (t :: Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) =+ Compare_0123456789876543210 t t+ instance SuppressUnusedWarnings Compare_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym1 (l :: Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) (l :: TyFun (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) Ordering)+ = forall arg. SameKind (Apply (Compare_0123456789876543210Sym1 l) arg) (Compare_0123456789876543210Sym2 l arg) =>+ Compare_0123456789876543210Sym1KindInference+ type instance Apply (Compare_0123456789876543210Sym1 l) l = Compare_0123456789876543210 l l+ instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym0 (l :: TyFun (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) (TyFun (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>+ Compare_0123456789876543210Sym0KindInference+ type instance Apply Compare_0123456789876543210Sym0 l = Compare_0123456789876543210Sym1 l+ instance POrd (Foo a b c d) where+ type Compare (a :: Foo a b c d) (a :: Foo a b c d) = Apply (Apply Compare_0123456789876543210Sym0 a) a+ data instance Sing (z :: Nat)+ = z ~ Zero => SZero |+ forall (n :: Nat). z ~ Succ n => SSucc (Sing (n :: Nat))+ type SNat = (Sing :: Nat -> GHC.Types.Type)+ instance SingKind Nat where+ type Demote Nat = Nat+ fromSing SZero = Zero+ fromSing (SSucc b) = Succ (fromSing b)+ toSing Zero = SomeSing SZero+ toSing (Succ b)+ = case toSing b :: SomeSing Nat of {+ SomeSing c -> SomeSing (SSucc c) }+ instance SEq Nat where+ (%:==) SZero SZero = STrue+ (%:==) SZero (SSucc _) = SFalse+ (%:==) (SSucc _) SZero = SFalse+ (%:==) (SSucc a) (SSucc b) = ((%:==) a) b+ instance SDecide Nat where+ (%~) SZero SZero = Proved Refl+ (%~) SZero (SSucc _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SSucc _) SZero+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SSucc a) (SSucc b)+ = case ((%~) a) b of+ Proved Refl -> Proved Refl+ Disproved contra+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ data instance Sing (z :: Foo a b c d)+ = forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ A n n n n =>+ SA (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d)) |+ forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ B n n n n =>+ SB (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d)) |+ forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ C n n n n =>+ SC (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d)) |+ forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ D n n n n =>+ SD (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d)) |+ forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ E n n n n =>+ SE (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d)) |+ forall (n :: a) (n :: b) (n :: c) (n :: d). z ~ F n n n n =>+ SF (Sing (n :: a)) (Sing (n :: b)) (Sing (n :: c)) (Sing (n :: d))+ type SFoo = (Sing :: Foo a b c d -> GHC.Types.Type)+ instance (SingKind a, SingKind b, SingKind c, SingKind d) =>+ SingKind (Foo a b c d) where+ type Demote (Foo a b c d) = Foo (Demote a) (Demote b) (Demote c) (Demote d)+ fromSing (SA b b b b)+ = (((A (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)+ fromSing (SB b b b b)+ = (((B (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)+ fromSing (SC b b b b)+ = (((C (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)+ fromSing (SD b b b b)+ = (((D (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)+ fromSing (SE b b b b)+ = (((E (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)+ fromSing (SF b b b b)+ = (((F (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)+ toSing (A b b b b)+ = case+ (((GHC.Tuple.(,,,) (toSing b :: SomeSing a))+ (toSing b :: SomeSing b))+ (toSing b :: SomeSing c))+ (toSing b :: SomeSing d)+ of {+ GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)+ -> SomeSing ((((SA c) c) c) c) }+ toSing (B b b b b)+ = case+ (((GHC.Tuple.(,,,) (toSing b :: SomeSing a))+ (toSing b :: SomeSing b))+ (toSing b :: SomeSing c))+ (toSing b :: SomeSing d)+ of {+ GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)+ -> SomeSing ((((SB c) c) c) c) }+ toSing (C b b b b)+ = case+ (((GHC.Tuple.(,,,) (toSing b :: SomeSing a))+ (toSing b :: SomeSing b))+ (toSing b :: SomeSing c))+ (toSing b :: SomeSing d)+ of {+ GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)+ -> SomeSing ((((SC c) c) c) c) }+ toSing (D b b b b)+ = case+ (((GHC.Tuple.(,,,) (toSing b :: SomeSing a))+ (toSing b :: SomeSing b))+ (toSing b :: SomeSing c))+ (toSing b :: SomeSing d)+ of {+ GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)+ -> SomeSing ((((SD c) c) c) c) }+ toSing (E b b b b)+ = case+ (((GHC.Tuple.(,,,) (toSing b :: SomeSing a))+ (toSing b :: SomeSing b))+ (toSing b :: SomeSing c))+ (toSing b :: SomeSing d)+ of {+ GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)+ -> SomeSing ((((SE c) c) c) c) }+ toSing (F b b b b)+ = case+ (((GHC.Tuple.(,,,) (toSing b :: SomeSing a))+ (toSing b :: SomeSing b))+ (toSing b :: SomeSing c))+ (toSing b :: SomeSing d)+ of {+ GHC.Tuple.(,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c)+ -> SomeSing ((((SF c) c) c) c) }+ instance (SEq a, SEq b, SEq c, SEq d) => SEq (Foo a b c d) where+ (%:==) (SA a a a a) (SA b b b b)+ = ((%:&&) (((%:==) a) b))+ (((%:&&) (((%:==) a) b)) (((%:&&) (((%:==) a) b)) (((%:==) a) b)))+ (%:==) (SA _ _ _ _) (SB _ _ _ _) = SFalse+ (%:==) (SA _ _ _ _) (SC _ _ _ _) = SFalse+ (%:==) (SA _ _ _ _) (SD _ _ _ _) = SFalse+ (%:==) (SA _ _ _ _) (SE _ _ _ _) = SFalse+ (%:==) (SA _ _ _ _) (SF _ _ _ _) = SFalse+ (%:==) (SB _ _ _ _) (SA _ _ _ _) = SFalse+ (%:==) (SB a a a a) (SB b b b b)+ = ((%:&&) (((%:==) a) b))+ (((%:&&) (((%:==) a) b)) (((%:&&) (((%:==) a) b)) (((%:==) a) b)))+ (%:==) (SB _ _ _ _) (SC _ _ _ _) = SFalse+ (%:==) (SB _ _ _ _) (SD _ _ _ _) = SFalse+ (%:==) (SB _ _ _ _) (SE _ _ _ _) = SFalse+ (%:==) (SB _ _ _ _) (SF _ _ _ _) = SFalse+ (%:==) (SC _ _ _ _) (SA _ _ _ _) = SFalse+ (%:==) (SC _ _ _ _) (SB _ _ _ _) = SFalse+ (%:==) (SC a a a a) (SC b b b b)+ = ((%:&&) (((%:==) a) b))+ (((%:&&) (((%:==) a) b)) (((%:&&) (((%:==) a) b)) (((%:==) a) b)))+ (%:==) (SC _ _ _ _) (SD _ _ _ _) = SFalse+ (%:==) (SC _ _ _ _) (SE _ _ _ _) = SFalse+ (%:==) (SC _ _ _ _) (SF _ _ _ _) = SFalse+ (%:==) (SD _ _ _ _) (SA _ _ _ _) = SFalse+ (%:==) (SD _ _ _ _) (SB _ _ _ _) = SFalse+ (%:==) (SD _ _ _ _) (SC _ _ _ _) = SFalse+ (%:==) (SD a a a a) (SD b b b b)+ = ((%:&&) (((%:==) a) b))+ (((%:&&) (((%:==) a) b)) (((%:&&) (((%:==) a) b)) (((%:==) a) b)))+ (%:==) (SD _ _ _ _) (SE _ _ _ _) = SFalse+ (%:==) (SD _ _ _ _) (SF _ _ _ _) = SFalse+ (%:==) (SE _ _ _ _) (SA _ _ _ _) = SFalse+ (%:==) (SE _ _ _ _) (SB _ _ _ _) = SFalse+ (%:==) (SE _ _ _ _) (SC _ _ _ _) = SFalse+ (%:==) (SE _ _ _ _) (SD _ _ _ _) = SFalse+ (%:==) (SE a a a a) (SE b b b b)+ = ((%:&&) (((%:==) a) b))+ (((%:&&) (((%:==) a) b)) (((%:&&) (((%:==) a) b)) (((%:==) a) b)))+ (%:==) (SE _ _ _ _) (SF _ _ _ _) = SFalse+ (%:==) (SF _ _ _ _) (SA _ _ _ _) = SFalse+ (%:==) (SF _ _ _ _) (SB _ _ _ _) = SFalse+ (%:==) (SF _ _ _ _) (SC _ _ _ _) = SFalse+ (%:==) (SF _ _ _ _) (SD _ _ _ _) = SFalse+ (%:==) (SF _ _ _ _) (SE _ _ _ _) = SFalse+ (%:==) (SF a a a a) (SF b b b b)+ = ((%:&&) (((%:==) a) b))+ (((%:&&) (((%:==) a) b)) (((%:&&) (((%:==) a) b)) (((%:==) a) b)))+ instance (SDecide a, SDecide b, SDecide c, SDecide d) =>+ SDecide (Foo a b c d) where+ (%~) (SA a a a a) (SA b b b b)+ = case+ (((GHC.Tuple.(,,,) (((%~) a) b)) (((%~) a) b)) (((%~) a) b))+ (((%~) a) b)+ of+ GHC.Tuple.(,,,) (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ -> Proved Refl+ GHC.Tuple.(,,,) (Disproved contra) _ _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ (Disproved contra) _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ (Disproved contra) _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ _ (Disproved contra)+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ (%~) (SA _ _ _ _) (SB _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SA _ _ _ _) (SC _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SA _ _ _ _) (SD _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SA _ _ _ _) (SE _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SA _ _ _ _) (SF _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SB _ _ _ _) (SA _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SB a a a a) (SB b b b b)+ = case+ (((GHC.Tuple.(,,,) (((%~) a) b)) (((%~) a) b)) (((%~) a) b))+ (((%~) a) b)+ of+ GHC.Tuple.(,,,) (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ -> Proved Refl+ GHC.Tuple.(,,,) (Disproved contra) _ _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ (Disproved contra) _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ (Disproved contra) _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ _ (Disproved contra)+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ (%~) (SB _ _ _ _) (SC _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SB _ _ _ _) (SD _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SB _ _ _ _) (SE _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SB _ _ _ _) (SF _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SC _ _ _ _) (SA _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SC _ _ _ _) (SB _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SC a a a a) (SC b b b b)+ = case+ (((GHC.Tuple.(,,,) (((%~) a) b)) (((%~) a) b)) (((%~) a) b))+ (((%~) a) b)+ of+ GHC.Tuple.(,,,) (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ -> Proved Refl+ GHC.Tuple.(,,,) (Disproved contra) _ _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ (Disproved contra) _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ (Disproved contra) _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ _ (Disproved contra)+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ (%~) (SC _ _ _ _) (SD _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SC _ _ _ _) (SE _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SC _ _ _ _) (SF _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SD _ _ _ _) (SA _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SD _ _ _ _) (SB _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SD _ _ _ _) (SC _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SD a a a a) (SD b b b b)+ = case+ (((GHC.Tuple.(,,,) (((%~) a) b)) (((%~) a) b)) (((%~) a) b))+ (((%~) a) b)+ of+ GHC.Tuple.(,,,) (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ -> Proved Refl+ GHC.Tuple.(,,,) (Disproved contra) _ _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ (Disproved contra) _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ (Disproved contra) _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ _ (Disproved contra)+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ (%~) (SD _ _ _ _) (SE _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SD _ _ _ _) (SF _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SE _ _ _ _) (SA _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SE _ _ _ _) (SB _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SE _ _ _ _) (SC _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SE _ _ _ _) (SD _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SE a a a a) (SE b b b b)+ = case+ (((GHC.Tuple.(,,,) (((%~) a) b)) (((%~) a) b)) (((%~) a) b))+ (((%~) a) b)+ of+ GHC.Tuple.(,,,) (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ -> Proved Refl+ GHC.Tuple.(,,,) (Disproved contra) _ _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ (Disproved contra) _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ (Disproved contra) _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ _ (Disproved contra)+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ (%~) (SE _ _ _ _) (SF _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SF _ _ _ _) (SA _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SF _ _ _ _) (SB _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SF _ _ _ _) (SC _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SF _ _ _ _) (SD _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SF _ _ _ _) (SE _ _ _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SF a a a a) (SF b b b b)+ = case+ (((GHC.Tuple.(,,,) (((%~) a) b)) (((%~) a) b)) (((%~) a) b))+ (((%~) a) b)+ of+ GHC.Tuple.(,,,) (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ (Proved Refl)+ -> Proved Refl+ GHC.Tuple.(,,,) (Disproved contra) _ _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ (Disproved contra) _ _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ (Disproved contra) _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,,,) _ _ _ (Disproved contra)+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ instance SOrd Nat => SOrd Nat where+ sCompare ::+ forall (t1 :: Nat) (t2 :: Nat).+ Sing t1+ -> Sing t2+ -> Sing (Apply (Apply (CompareSym0 :: TyFun Nat (TyFun Nat Ordering+ -> GHC.Types.Type)+ -> GHC.Types.Type) t1 :: TyFun Nat Ordering+ -> GHC.Types.Type) t2 :: Ordering)+ sCompare SZero SZero+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ SNil+ sCompare+ (SSucc (sA_0123456789876543210 :: Sing a_0123456789876543210))+ (SSucc (sB_0123456789876543210 :: Sing b_0123456789876543210))+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ SNil)+ sCompare SZero (SSucc _) = SLT+ sCompare (SSucc _) SZero = SGT+ instance (SOrd a, SOrd b, SOrd c, SOrd d) =>+ SOrd (Foo a b c d) where+ sCompare ::+ forall (t1 :: Foo a b c d) (t2 :: Foo a b c d).+ Sing t1+ -> Sing t2+ -> Sing (Apply (Apply (CompareSym0 :: TyFun (Foo a b c d) (TyFun (Foo a b c d) Ordering+ -> GHC.Types.Type)+ -> GHC.Types.Type) t1 :: TyFun (Foo a b c d) Ordering+ -> GHC.Types.Type) t2 :: Ordering)+ sCompare+ (SA (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210))+ (SA (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210))+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ SNil))))+ sCompare+ (SB (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210))+ (SB (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210))+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ SNil))))+ sCompare+ (SC (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210))+ (SC (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210))+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ SNil))))+ sCompare+ (SD (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210))+ (SD (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210))+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ SNil))))+ sCompare+ (SE (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210))+ (SE (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210))+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ SNil))))+ sCompare+ (SF (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210))+ (SF (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210))+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ SNil))))+ sCompare (SA _ _ _ _) (SB _ _ _ _) = SLT+ sCompare (SA _ _ _ _) (SC _ _ _ _) = SLT+ sCompare (SA _ _ _ _) (SD _ _ _ _) = SLT+ sCompare (SA _ _ _ _) (SE _ _ _ _) = SLT+ sCompare (SA _ _ _ _) (SF _ _ _ _) = SLT+ sCompare (SB _ _ _ _) (SA _ _ _ _) = SGT+ sCompare (SB _ _ _ _) (SC _ _ _ _) = SLT+ sCompare (SB _ _ _ _) (SD _ _ _ _) = SLT+ sCompare (SB _ _ _ _) (SE _ _ _ _) = SLT+ sCompare (SB _ _ _ _) (SF _ _ _ _) = SLT+ sCompare (SC _ _ _ _) (SA _ _ _ _) = SGT+ sCompare (SC _ _ _ _) (SB _ _ _ _) = SGT+ sCompare (SC _ _ _ _) (SD _ _ _ _) = SLT+ sCompare (SC _ _ _ _) (SE _ _ _ _) = SLT+ sCompare (SC _ _ _ _) (SF _ _ _ _) = SLT+ sCompare (SD _ _ _ _) (SA _ _ _ _) = SGT+ sCompare (SD _ _ _ _) (SB _ _ _ _) = SGT+ sCompare (SD _ _ _ _) (SC _ _ _ _) = SGT+ sCompare (SD _ _ _ _) (SE _ _ _ _) = SLT+ sCompare (SD _ _ _ _) (SF _ _ _ _) = SLT+ sCompare (SE _ _ _ _) (SA _ _ _ _) = SGT+ sCompare (SE _ _ _ _) (SB _ _ _ _) = SGT+ sCompare (SE _ _ _ _) (SC _ _ _ _) = SGT+ sCompare (SE _ _ _ _) (SD _ _ _ _) = SGT+ sCompare (SE _ _ _ _) (SF _ _ _ _) = SLT+ sCompare (SF _ _ _ _) (SA _ _ _ _) = SGT+ sCompare (SF _ _ _ _) (SB _ _ _ _) = SGT+ sCompare (SF _ _ _ _) (SC _ _ _ _) = SGT+ sCompare (SF _ _ _ _) (SD _ _ _ _) = SGT+ sCompare (SF _ _ _ _) (SE _ _ _ _) = SGT+ instance SingI Zero where+ sing = SZero+ instance SingI n => SingI (Succ (n :: Nat)) where+ sing = SSucc sing+ instance (SingI n, SingI n, SingI n, SingI n) =>+ SingI (A (n :: a) (n :: b) (n :: c) (n :: d)) where+ sing = (((SA sing) sing) sing) sing+ instance (SingI n, SingI n, SingI n, SingI n) =>+ SingI (B (n :: a) (n :: b) (n :: c) (n :: d)) where+ sing = (((SB sing) sing) sing) sing+ instance (SingI n, SingI n, SingI n, SingI n) =>+ SingI (C (n :: a) (n :: b) (n :: c) (n :: d)) where+ sing = (((SC sing) sing) sing) sing+ instance (SingI n, SingI n, SingI n, SingI n) =>+ SingI (D (n :: a) (n :: b) (n :: c) (n :: d)) where+ sing = (((SD sing) sing) sing) sing+ instance (SingI n, SingI n, SingI n, SingI n) =>+ SingI (E (n :: a) (n :: b) (n :: c) (n :: d)) where+ sing = (((SE sing) sing) sing) sing+ instance (SingI n, SingI n, SingI n, SingI n) =>+ SingI (F (n :: a) (n :: b) (n :: c) (n :: d)) where+ sing = (((SF sing) sing) sing) sing
− tests/compile-and-dump/Singletons/PatternMatching.ghc80.template
@@ -1,586 +0,0 @@-Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| pr = Pair (Succ Zero) ([Zero])- complex = Pair (Pair (Just Zero) Zero) False- tuple = (False, Just Zero, True)- aList = [Zero, Succ Zero, Succ (Succ Zero)]- - data Pair a b- = Pair a b- deriving (Show) |]- ======>- data Pair a b- = Pair a b- deriving (Show)- pr = Pair (Succ Zero) [Zero]- complex = Pair (Pair (Just Zero) Zero) False- tuple = (False, Just Zero, True)- aList = [Zero, Succ Zero, Succ (Succ Zero)]- type PairSym2 (t :: a0123456789) (t :: b0123456789) = Pair t t- instance SuppressUnusedWarnings PairSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) PairSym1KindInference GHC.Tuple.())- data PairSym1 (l :: a0123456789)- (l :: TyFun b0123456789 (Pair a0123456789 b0123456789))- = forall arg. KindOf (Apply (PairSym1 l) arg) ~ KindOf (PairSym2 l arg) =>- PairSym1KindInference- type instance Apply (PairSym1 l) l = PairSym2 l l- instance SuppressUnusedWarnings PairSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) PairSym0KindInference GHC.Tuple.())- data PairSym0 (l :: TyFun a0123456789 (TyFun b0123456789 (Pair a0123456789 b0123456789)- -> GHC.Types.Type))- = forall arg. KindOf (Apply PairSym0 arg) ~ KindOf (PairSym1 arg) =>- PairSym0KindInference- type instance Apply PairSym0 l = PairSym1 l- type AListSym0 = AList- type TupleSym0 = Tuple- type ComplexSym0 = Complex- type PrSym0 = Pr- type family AList where- AList = Apply (Apply (:$) ZeroSym0) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:$) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))) '[]))- type family Tuple where- Tuple = Apply (Apply (Apply Tuple3Sym0 FalseSym0) (Apply JustSym0 ZeroSym0)) TrueSym0- type family Complex where- Complex = Apply (Apply PairSym0 (Apply (Apply PairSym0 (Apply JustSym0 ZeroSym0)) ZeroSym0)) FalseSym0- type family Pr where- Pr = Apply (Apply PairSym0 (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:$) ZeroSym0) '[])- sAList :: Sing AListSym0- sTuple :: Sing TupleSym0- sComplex :: Sing ComplexSym0- sPr :: Sing PrSym0- sAList- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SZero)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero)))- SNil))- sTuple- = applySing- (applySing- (applySing (singFun3 (Proxy :: Proxy Tuple3Sym0) STuple3) SFalse)- (applySing (singFun1 (Proxy :: Proxy JustSym0) SJust) SZero))- STrue- sComplex- = applySing- (applySing- (singFun2 (Proxy :: Proxy PairSym0) SPair)- (applySing- (applySing- (singFun2 (Proxy :: Proxy PairSym0) SPair)- (applySing (singFun1 (Proxy :: Proxy JustSym0) SJust) SZero))- SZero))- SFalse- sPr- = applySing- (applySing- (singFun2 (Proxy :: Proxy PairSym0) SPair)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SZero) SNil)- data instance Sing (z :: Pair a b)- = forall (n :: a) (n :: b). z ~ Pair n n =>- SPair (Sing (n :: a)) (Sing (n :: b))- type SPair = (Sing :: Pair a b -> GHC.Types.Type)- instance (SingKind a, SingKind b) => SingKind (Pair a b) where- type DemoteRep (Pair a b) = Pair (DemoteRep a) (DemoteRep b)- fromSing (SPair b b) = Pair (fromSing b) (fromSing b)- toSing (Pair b b)- = case- GHC.Tuple.(,) (toSing b :: SomeSing a) (toSing b :: SomeSing b)- of {- GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing (SPair c c) }- instance (SingI n, SingI n) => SingI (Pair (n :: a) (n :: b)) where- sing = SPair sing sing-Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| Pair sz lz = pr- Pair (Pair jz zz) fls = complex- (tf, tjz, tt) = tuple- [_, lsz, (Succ blimy)] = aList- lsz :: Nat- fls :: Bool- foo1 :: (a, b) -> a- foo1 (x, y) = (\ _ -> x) y- foo2 :: (# a, b #) -> a- foo2 t@(# x, y #) = case t of { (# a, b #) -> (\ _ -> a) b }- silly :: a -> ()- silly x = case x of { _ -> () } |]- ======>- Pair sz lz = pr- Pair (Pair jz zz) fls = complex- (tf, tjz, tt) = tuple- [_, lsz, Succ blimy] = aList- lsz :: Nat- fls :: Bool- foo1 :: forall a b. (a, b) -> a- foo1 (x, y) = (\ _ -> x) y- foo2 :: forall a b. (# a, b #) -> a- foo2 t@(# x, y #) = case t of { (# a, b #) -> (\ _ -> a) b }- silly :: forall a. a -> ()- silly x = case x of { _ -> GHC.Tuple.() }- type family Case_0123456789 x t where- Case_0123456789 x _z_0123456789 = Tuple0Sym0- type Let0123456789TSym2 t t = Let0123456789T t t- instance SuppressUnusedWarnings Let0123456789TSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789TSym1KindInference GHC.Tuple.())- data Let0123456789TSym1 l l- = forall arg. KindOf (Apply (Let0123456789TSym1 l) arg) ~ KindOf (Let0123456789TSym2 l arg) =>- Let0123456789TSym1KindInference- type instance Apply (Let0123456789TSym1 l) l = Let0123456789TSym2 l l- instance SuppressUnusedWarnings Let0123456789TSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Let0123456789TSym0KindInference GHC.Tuple.())- data Let0123456789TSym0 l- = forall arg. KindOf (Apply Let0123456789TSym0 arg) ~ KindOf (Let0123456789TSym1 arg) =>- Let0123456789TSym0KindInference- type instance Apply Let0123456789TSym0 l = Let0123456789TSym1 l- type family Let0123456789T x y where- Let0123456789T x y = Apply (Apply Tuple2Sym0 x) y- type family Case_0123456789 x y a b arg_0123456789 t where- Case_0123456789 x y a b arg_0123456789 _z_0123456789 = a- type family Lambda_0123456789 x y a b t where- Lambda_0123456789 x y a b arg_0123456789 = Case_0123456789 x y a b arg_0123456789 arg_0123456789- type Lambda_0123456789Sym5 t t t t t = Lambda_0123456789 t t t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym4 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym4KindInference GHC.Tuple.())- data Lambda_0123456789Sym4 l l l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym4 l l l l) arg) ~ KindOf (Lambda_0123456789Sym5 l l l l arg) =>- Lambda_0123456789Sym4KindInference- type instance Apply (Lambda_0123456789Sym4 l l l l) l = Lambda_0123456789Sym5 l l l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym3 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym3KindInference GHC.Tuple.())- data Lambda_0123456789Sym3 l l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym3 l l l) arg) ~ KindOf (Lambda_0123456789Sym4 l l l arg) =>- Lambda_0123456789Sym3KindInference- type instance Apply (Lambda_0123456789Sym3 l l l) l = Lambda_0123456789Sym4 l l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Case_0123456789 x y t where- Case_0123456789 x y '(a,- b) = Apply (Apply (Apply (Apply (Apply Lambda_0123456789Sym0 x) y) a) b) b- type family Case_0123456789 x y arg_0123456789 t where- Case_0123456789 x y arg_0123456789 _z_0123456789 = x- type family Lambda_0123456789 x y t where- Lambda_0123456789 x y arg_0123456789 = Case_0123456789 x y arg_0123456789 arg_0123456789- type Lambda_0123456789Sym3 t t t = Lambda_0123456789 t t t- instance SuppressUnusedWarnings Lambda_0123456789Sym2 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym2KindInference GHC.Tuple.())- data Lambda_0123456789Sym2 l l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym2 l l) arg) ~ KindOf (Lambda_0123456789Sym3 l l arg) =>- Lambda_0123456789Sym2KindInference- type instance Apply (Lambda_0123456789Sym2 l l) l = Lambda_0123456789Sym3 l l l- instance SuppressUnusedWarnings Lambda_0123456789Sym1 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym1KindInference GHC.Tuple.())- data Lambda_0123456789Sym1 l l- = forall arg. KindOf (Apply (Lambda_0123456789Sym1 l) arg) ~ KindOf (Lambda_0123456789Sym2 l arg) =>- Lambda_0123456789Sym1KindInference- type instance Apply (Lambda_0123456789Sym1 l) l = Lambda_0123456789Sym2 l l- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type family Case_0123456789 t where- Case_0123456789 '[_z_0123456789,- y_0123456789,- Succ _z_0123456789] = y_0123456789- type family Case_0123456789 t where- Case_0123456789 '[_z_0123456789,- _z_0123456789,- Succ y_0123456789] = y_0123456789- type family Case_0123456789 t where- Case_0123456789 '(y_0123456789,- _z_0123456789,- _z_0123456789) = y_0123456789- type family Case_0123456789 t where- Case_0123456789 '(_z_0123456789,- y_0123456789,- _z_0123456789) = y_0123456789- type family Case_0123456789 t where- Case_0123456789 '(_z_0123456789,- _z_0123456789,- y_0123456789) = y_0123456789- type family Case_0123456789 t where- Case_0123456789 (Pair (Pair y_0123456789 _z_0123456789) _z_0123456789) = y_0123456789- type family Case_0123456789 t where- Case_0123456789 (Pair (Pair _z_0123456789 y_0123456789) _z_0123456789) = y_0123456789- type family Case_0123456789 t where- Case_0123456789 (Pair (Pair _z_0123456789 _z_0123456789) y_0123456789) = y_0123456789- type family Case_0123456789 t where- Case_0123456789 (Pair y_0123456789 _z_0123456789) = y_0123456789- type family Case_0123456789 t where- Case_0123456789 (Pair _z_0123456789 y_0123456789) = y_0123456789- type SillySym1 (t :: a0123456789) = Silly t- instance SuppressUnusedWarnings SillySym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) SillySym0KindInference GHC.Tuple.())- data SillySym0 (l :: TyFun a0123456789 ())- = forall arg. KindOf (Apply SillySym0 arg) ~ KindOf (SillySym1 arg) =>- SillySym0KindInference- type instance Apply SillySym0 l = SillySym1 l- type Foo2Sym1 (t :: (a0123456789, b0123456789)) = Foo2 t- instance SuppressUnusedWarnings Foo2Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo2Sym0KindInference GHC.Tuple.())- data Foo2Sym0 (l :: TyFun (a0123456789, b0123456789) a0123456789)- = forall arg. KindOf (Apply Foo2Sym0 arg) ~ KindOf (Foo2Sym1 arg) =>- Foo2Sym0KindInference- type instance Apply Foo2Sym0 l = Foo2Sym1 l- type Foo1Sym1 (t :: (a0123456789, b0123456789)) = Foo1 t- instance SuppressUnusedWarnings Foo1Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Foo1Sym0KindInference GHC.Tuple.())- data Foo1Sym0 (l :: TyFun (a0123456789, b0123456789) a0123456789)- = forall arg. KindOf (Apply Foo1Sym0 arg) ~ KindOf (Foo1Sym1 arg) =>- Foo1Sym0KindInference- type instance Apply Foo1Sym0 l = Foo1Sym1 l- type LszSym0 = Lsz- type BlimySym0 = Blimy- type TfSym0 = Tf- type TjzSym0 = Tjz- type TtSym0 = Tt- type JzSym0 = Jz- type ZzSym0 = Zz- type FlsSym0 = Fls- type SzSym0 = Sz- type LzSym0 = Lz- type X_0123456789Sym0 = X_0123456789- type X_0123456789Sym0 = X_0123456789- type X_0123456789Sym0 = X_0123456789- type X_0123456789Sym0 = X_0123456789- type family Silly (a :: a) :: () where- Silly x = Case_0123456789 x x- type family Foo2 (a :: (a, b)) :: a where- Foo2 '(x, y) = Case_0123456789 x y (Let0123456789TSym2 x y)- type family Foo1 (a :: (a, b)) :: a where- Foo1 '(x, y) = Apply (Apply (Apply Lambda_0123456789Sym0 x) y) y- type family Lsz :: Nat where- Lsz = Case_0123456789 X_0123456789Sym0- type family Blimy where- Blimy = Case_0123456789 X_0123456789Sym0- type family Tf where- Tf = Case_0123456789 X_0123456789Sym0- type family Tjz where- Tjz = Case_0123456789 X_0123456789Sym0- type family Tt where- Tt = Case_0123456789 X_0123456789Sym0- type family Jz where- Jz = Case_0123456789 X_0123456789Sym0- type family Zz where- Zz = Case_0123456789 X_0123456789Sym0- type family Fls :: Bool where- Fls = Case_0123456789 X_0123456789Sym0- type family Sz where- Sz = Case_0123456789 X_0123456789Sym0- type family Lz where- Lz = Case_0123456789 X_0123456789Sym0- type family X_0123456789 where- X_0123456789 = PrSym0- type family X_0123456789 where- X_0123456789 = ComplexSym0- type family X_0123456789 where- X_0123456789 = TupleSym0- type family X_0123456789 where- X_0123456789 = AListSym0- sSilly :: forall (t :: a). Sing t -> Sing (Apply SillySym0 t :: ())- sFoo2 ::- forall (t :: (a, b)). Sing t -> Sing (Apply Foo2Sym0 t :: a)- sFoo1 ::- forall (t :: (a, b)). Sing t -> Sing (Apply Foo1Sym0 t :: a)- sLsz :: Sing (LszSym0 :: Nat)- sBlimy :: Sing BlimySym0- sTf :: Sing TfSym0- sTjz :: Sing TjzSym0- sTt :: Sing TtSym0- sJz :: Sing JzSym0- sZz :: Sing ZzSym0- sFls :: Sing (FlsSym0 :: Bool)- sSz :: Sing SzSym0- sLz :: Sing LzSym0- sX_0123456789 :: Sing X_0123456789Sym0- sX_0123456789 :: Sing X_0123456789Sym0- sX_0123456789 :: Sing X_0123456789Sym0- sX_0123456789 :: Sing X_0123456789Sym0- sSilly sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply SillySym0 t :: ())- lambda x- = case x of {- _s_z_0123456789- -> let- lambda ::- forall _z_0123456789.- _z_0123456789 ~ x =>- Sing _z_0123456789 -> Sing (Case_0123456789 x _z_0123456789 :: ())- lambda _z_0123456789 = STuple0- in lambda _s_z_0123456789 } ::- Sing (Case_0123456789 x x :: ())- in lambda sX- sFoo2 (STuple2 sX sY)- = let- lambda ::- forall x y.- t ~ Apply (Apply Tuple2Sym0 x) y =>- Sing x -> Sing y -> Sing (Apply Foo2Sym0 t :: a)- lambda x y- = let- sT :: Sing (Let0123456789TSym2 x y)- sT- = applySing- (applySing (singFun2 (Proxy :: Proxy Tuple2Sym0) STuple2) x) y- in case sT of {- STuple2 sA sB- -> let- lambda ::- forall a b.- Apply (Apply Tuple2Sym0 a) b ~ Let0123456789TSym2 x y =>- Sing a- -> Sing b- -> Sing (Case_0123456789 x y (Apply (Apply Tuple2Sym0 a) b) :: a)- lambda a b- = applySing- (singFun1- (Proxy ::- Proxy (Apply (Apply (Apply (Apply Lambda_0123456789Sym0 x) y) a) b))- (\ sArg_0123456789- -> let- lambda ::- forall arg_0123456789.- Sing arg_0123456789- -> Sing (Apply (Apply (Apply (Apply (Apply Lambda_0123456789Sym0 x) y) a) b) arg_0123456789)- lambda arg_0123456789- = case arg_0123456789 of {- _s_z_0123456789- -> let- lambda ::- forall _z_0123456789.- _z_0123456789 ~ arg_0123456789 =>- Sing _z_0123456789- -> Sing (Case_0123456789 x y a b arg_0123456789 _z_0123456789)- lambda _z_0123456789 = a- in lambda _s_z_0123456789 } ::- Sing (Case_0123456789 x y a b arg_0123456789 arg_0123456789)- in lambda sArg_0123456789))- b- in lambda sA sB } ::- Sing (Case_0123456789 x y (Let0123456789TSym2 x y) :: a)- in lambda sX sY- sFoo1 (STuple2 sX sY)- = let- lambda ::- forall x y.- t ~ Apply (Apply Tuple2Sym0 x) y =>- Sing x -> Sing y -> Sing (Apply Foo1Sym0 t :: a)- lambda x y- = applySing- (singFun1- (Proxy :: Proxy (Apply (Apply Lambda_0123456789Sym0 x) y))- (\ sArg_0123456789- -> let- lambda ::- forall arg_0123456789.- Sing arg_0123456789- -> Sing (Apply (Apply (Apply Lambda_0123456789Sym0 x) y) arg_0123456789)- lambda arg_0123456789- = case arg_0123456789 of {- _s_z_0123456789- -> let- lambda ::- forall _z_0123456789.- _z_0123456789 ~ arg_0123456789 =>- Sing _z_0123456789- -> Sing (Case_0123456789 x y arg_0123456789 _z_0123456789)- lambda _z_0123456789 = x- in lambda _s_z_0123456789 } ::- Sing (Case_0123456789 x y arg_0123456789 arg_0123456789)- in lambda sArg_0123456789))- y- in lambda sX sY- sLsz- = case sX_0123456789 of {- SCons _s_z_0123456789- (SCons sY_0123456789 (SCons (SSucc _s_z_0123456789) SNil))- -> let- lambda ::- forall _z_0123456789 y_0123456789 _z_0123456789.- Apply (Apply (:$) _z_0123456789) (Apply (Apply (:$) y_0123456789) (Apply (Apply (:$) (Apply SuccSym0 _z_0123456789)) '[])) ~ X_0123456789Sym0 =>- Sing _z_0123456789- -> Sing y_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 (Apply (Apply (:$) _z_0123456789) (Apply (Apply (:$) y_0123456789) (Apply (Apply (:$) (Apply SuccSym0 _z_0123456789)) '[]))) :: Nat)- lambda _z_0123456789 y_0123456789 _z_0123456789 = y_0123456789- in lambda _s_z_0123456789 sY_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0 :: Nat)- sBlimy- = case sX_0123456789 of {- SCons _s_z_0123456789- (SCons _s_z_0123456789 (SCons (SSucc sY_0123456789) SNil))- -> let- lambda ::- forall _z_0123456789 _z_0123456789 y_0123456789.- Apply (Apply (:$) _z_0123456789) (Apply (Apply (:$) _z_0123456789) (Apply (Apply (:$) (Apply SuccSym0 y_0123456789)) '[])) ~ X_0123456789Sym0 =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing y_0123456789- -> Sing (Case_0123456789 (Apply (Apply (:$) _z_0123456789) (Apply (Apply (:$) _z_0123456789) (Apply (Apply (:$) (Apply SuccSym0 y_0123456789)) '[]))))- lambda _z_0123456789 _z_0123456789 y_0123456789 = y_0123456789- in lambda _s_z_0123456789 _s_z_0123456789 sY_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0)- sTf- = case sX_0123456789 of {- STuple3 sY_0123456789 _s_z_0123456789 _s_z_0123456789- -> let- lambda ::- forall y_0123456789 _z_0123456789 _z_0123456789.- Apply (Apply (Apply Tuple3Sym0 y_0123456789) _z_0123456789) _z_0123456789 ~ X_0123456789Sym0 =>- Sing y_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 (Apply (Apply (Apply Tuple3Sym0 y_0123456789) _z_0123456789) _z_0123456789))- lambda y_0123456789 _z_0123456789 _z_0123456789 = y_0123456789- in lambda sY_0123456789 _s_z_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0)- sTjz- = case sX_0123456789 of {- STuple3 _s_z_0123456789 sY_0123456789 _s_z_0123456789- -> let- lambda ::- forall _z_0123456789 y_0123456789 _z_0123456789.- Apply (Apply (Apply Tuple3Sym0 _z_0123456789) y_0123456789) _z_0123456789 ~ X_0123456789Sym0 =>- Sing _z_0123456789- -> Sing y_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 (Apply (Apply (Apply Tuple3Sym0 _z_0123456789) y_0123456789) _z_0123456789))- lambda _z_0123456789 y_0123456789 _z_0123456789 = y_0123456789- in lambda _s_z_0123456789 sY_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0)- sTt- = case sX_0123456789 of {- STuple3 _s_z_0123456789 _s_z_0123456789 sY_0123456789- -> let- lambda ::- forall _z_0123456789 _z_0123456789 y_0123456789.- Apply (Apply (Apply Tuple3Sym0 _z_0123456789) _z_0123456789) y_0123456789 ~ X_0123456789Sym0 =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing y_0123456789- -> Sing (Case_0123456789 (Apply (Apply (Apply Tuple3Sym0 _z_0123456789) _z_0123456789) y_0123456789))- lambda _z_0123456789 _z_0123456789 y_0123456789 = y_0123456789- in lambda _s_z_0123456789 _s_z_0123456789 sY_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0)- sJz- = case sX_0123456789 of {- SPair (SPair sY_0123456789 _s_z_0123456789) _s_z_0123456789- -> let- lambda ::- forall y_0123456789 _z_0123456789 _z_0123456789.- Apply (Apply PairSym0 (Apply (Apply PairSym0 y_0123456789) _z_0123456789)) _z_0123456789 ~ X_0123456789Sym0 =>- Sing y_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 (Apply (Apply PairSym0 (Apply (Apply PairSym0 y_0123456789) _z_0123456789)) _z_0123456789))- lambda y_0123456789 _z_0123456789 _z_0123456789 = y_0123456789- in lambda sY_0123456789 _s_z_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0)- sZz- = case sX_0123456789 of {- SPair (SPair _s_z_0123456789 sY_0123456789) _s_z_0123456789- -> let- lambda ::- forall _z_0123456789 y_0123456789 _z_0123456789.- Apply (Apply PairSym0 (Apply (Apply PairSym0 _z_0123456789) y_0123456789)) _z_0123456789 ~ X_0123456789Sym0 =>- Sing _z_0123456789- -> Sing y_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 (Apply (Apply PairSym0 (Apply (Apply PairSym0 _z_0123456789) y_0123456789)) _z_0123456789))- lambda _z_0123456789 y_0123456789 _z_0123456789 = y_0123456789- in lambda _s_z_0123456789 sY_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0)- sFls- = case sX_0123456789 of {- SPair (SPair _s_z_0123456789 _s_z_0123456789) sY_0123456789- -> let- lambda ::- forall _z_0123456789 _z_0123456789 y_0123456789.- Apply (Apply PairSym0 (Apply (Apply PairSym0 _z_0123456789) _z_0123456789)) y_0123456789 ~ X_0123456789Sym0 =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing y_0123456789- -> Sing (Case_0123456789 (Apply (Apply PairSym0 (Apply (Apply PairSym0 _z_0123456789) _z_0123456789)) y_0123456789) :: Bool)- lambda _z_0123456789 _z_0123456789 y_0123456789 = y_0123456789- in lambda _s_z_0123456789 _s_z_0123456789 sY_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0 :: Bool)- sSz- = case sX_0123456789 of {- SPair sY_0123456789 _s_z_0123456789- -> let- lambda ::- forall y_0123456789 _z_0123456789.- Apply (Apply PairSym0 y_0123456789) _z_0123456789 ~ X_0123456789Sym0 =>- Sing y_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 (Apply (Apply PairSym0 y_0123456789) _z_0123456789))- lambda y_0123456789 _z_0123456789 = y_0123456789- in lambda sY_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0)- sLz- = case sX_0123456789 of {- SPair _s_z_0123456789 sY_0123456789- -> let- lambda ::- forall _z_0123456789 y_0123456789.- Apply (Apply PairSym0 _z_0123456789) y_0123456789 ~ X_0123456789Sym0 =>- Sing _z_0123456789- -> Sing y_0123456789- -> Sing (Case_0123456789 (Apply (Apply PairSym0 _z_0123456789) y_0123456789))- lambda _z_0123456789 y_0123456789 = y_0123456789- in lambda _s_z_0123456789 sY_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0)- sX_0123456789 = sPr- sX_0123456789 = sComplex- sX_0123456789 = sTuple- sX_0123456789 = sAList
+ tests/compile-and-dump/Singletons/PatternMatching.ghc82.template view
@@ -0,0 +1,450 @@+Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| pr = Pair (Succ Zero) ([Zero])+ complex = Pair (Pair (Just Zero) Zero) False+ tuple = (False, Just Zero, True)+ aList = [Zero, Succ Zero, Succ (Succ Zero)]+ + data Pair a b+ = Pair a b+ deriving Show |]+ ======>+ data Pair a b+ = Pair a b+ deriving Show+ pr = (Pair (Succ Zero)) [Zero]+ complex = (Pair ((Pair (Just Zero)) Zero)) False+ tuple = (False, Just Zero, True)+ aList = [Zero, Succ Zero, Succ (Succ Zero)]+ type PairSym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Pair t t+ instance SuppressUnusedWarnings PairSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) PairSym1KindInference) GHC.Tuple.())+ data PairSym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210))+ = forall arg. SameKind (Apply (PairSym1 l) arg) (PairSym2 l arg) =>+ PairSym1KindInference+ type instance Apply (PairSym1 l) l = Pair l l+ instance SuppressUnusedWarnings PairSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) PairSym0KindInference) GHC.Tuple.())+ data PairSym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) =>+ PairSym0KindInference+ type instance Apply PairSym0 l = PairSym1 l+ type AListSym0 = AList+ type TupleSym0 = Tuple+ type ComplexSym0 = Complex+ type PrSym0 = Pr+ type family AList where+ = Apply (Apply (:$) ZeroSym0) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:$) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))) '[]))+ type family Tuple where+ = Apply (Apply (Apply Tuple3Sym0 FalseSym0) (Apply JustSym0 ZeroSym0)) TrueSym0+ type family Complex where+ = Apply (Apply PairSym0 (Apply (Apply PairSym0 (Apply JustSym0 ZeroSym0)) ZeroSym0)) FalseSym0+ type family Pr where+ = Apply (Apply PairSym0 (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:$) ZeroSym0) '[])+ sAList :: Sing AListSym0+ sTuple :: Sing TupleSym0+ sComplex :: Sing ComplexSym0+ sPr :: Sing PrSym0+ sAList+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) SZero))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @SuccSym0) SSucc))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))+ SNil))+ sTuple+ = (applySing+ ((applySing ((applySing ((singFun3 @Tuple3Sym0) STuple3)) SFalse))+ ((applySing ((singFun1 @JustSym0) SJust)) SZero)))+ STrue+ sComplex+ = (applySing+ ((applySing ((singFun2 @PairSym0) SPair))+ ((applySing+ ((applySing ((singFun2 @PairSym0) SPair))+ ((applySing ((singFun1 @JustSym0) SJust)) SZero)))+ SZero)))+ SFalse+ sPr+ = (applySing+ ((applySing ((singFun2 @PairSym0) SPair))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SZero)) SNil)+ data instance Sing (z :: Pair a b)+ = forall (n :: a) (n :: b). z ~ Pair n n =>+ SPair (Sing (n :: a)) (Sing (n :: b))+ type SPair = (Sing :: Pair a b -> GHC.Types.Type)+ instance (SingKind a, SingKind b) => SingKind (Pair a b) where+ type Demote (Pair a b) = Pair (Demote a) (Demote b)+ fromSing (SPair b b) = (Pair (fromSing b)) (fromSing b)+ toSing (Pair b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing a)) (toSing b :: SomeSing b)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing ((SPair c) c) }+ instance (SingI n, SingI n) => SingI (Pair (n :: a) (n :: b)) where+ sing = (SPair sing) sing+Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| Pair sz lz = pr+ Pair (Pair jz zz) fls = complex+ (tf, tjz, tt) = tuple+ [_, lsz, (Succ blimy)] = aList+ lsz :: Nat+ fls :: Bool+ foo1 :: (a, b) -> a+ foo1 (x, y) = (\ _ -> x) y+ foo2 :: (# a, b #) -> a+ foo2 t@(# x, y #) = case t of { (# a, b #) -> (\ _ -> a) b }+ silly :: a -> ()+ silly x = case x of { _ -> () } |]+ ======>+ Pair sz lz = pr+ Pair (Pair jz zz) fls = complex+ (tf, tjz, tt) = tuple+ [_, lsz, Succ blimy] = aList+ lsz :: Nat+ fls :: Bool+ foo1 :: (a, b) -> a+ foo1 (x, y) = (\ _ -> x) y+ foo2 :: (# a, b #) -> a+ foo2 t@(# x, y #) = case t of { (# a, b #) -> (\ _ -> a) b }+ silly :: a -> ()+ silly x = case x of { _ -> GHC.Tuple.() }+ type family Case_0123456789876543210 x t where+ Case_0123456789876543210 x _z_0123456789876543210 = Tuple0Sym0+ type Let0123456789876543210TSym2 t t = Let0123456789876543210T t t+ instance SuppressUnusedWarnings Let0123456789876543210TSym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210TSym1KindInference)+ GHC.Tuple.())+ data Let0123456789876543210TSym1 l l+ = forall arg. SameKind (Apply (Let0123456789876543210TSym1 l) arg) (Let0123456789876543210TSym2 l arg) =>+ Let0123456789876543210TSym1KindInference+ type instance Apply (Let0123456789876543210TSym1 l) l = Let0123456789876543210T l l+ instance SuppressUnusedWarnings Let0123456789876543210TSym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Let0123456789876543210TSym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210TSym0 l+ = forall arg. SameKind (Apply Let0123456789876543210TSym0 arg) (Let0123456789876543210TSym1 arg) =>+ Let0123456789876543210TSym0KindInference+ type instance Apply Let0123456789876543210TSym0 l = Let0123456789876543210TSym1 l+ type family Let0123456789876543210T x y where+ Let0123456789876543210T x y = Apply (Apply Tuple2Sym0 x) y+ type family Case_0123456789876543210 x y a b arg_0123456789876543210 t where+ Case_0123456789876543210 x y a b arg_0123456789876543210 _z_0123456789876543210 = a+ type family Lambda_0123456789876543210 x y a b t where+ Lambda_0123456789876543210 x y a b arg_0123456789876543210 = Case_0123456789876543210 x y a b arg_0123456789876543210 arg_0123456789876543210+ type Lambda_0123456789876543210Sym5 t t t t t =+ Lambda_0123456789876543210 t t t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym4 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym4KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym4 l l l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym4 l l l l) arg) (Lambda_0123456789876543210Sym5 l l l l arg) =>+ Lambda_0123456789876543210Sym4KindInference+ type instance Apply (Lambda_0123456789876543210Sym4 l l l l) l = Lambda_0123456789876543210 l l l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym3 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym3KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym3 l l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym3 l l l) arg) (Lambda_0123456789876543210Sym4 l l l arg) =>+ Lambda_0123456789876543210Sym3KindInference+ type instance Apply (Lambda_0123456789876543210Sym3 l l l) l = Lambda_0123456789876543210Sym4 l l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210Sym3 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Case_0123456789876543210 x y t where+ Case_0123456789876543210 x y '(a,+ b) = Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) a) b) b+ type family Case_0123456789876543210 x y arg_0123456789876543210 t where+ Case_0123456789876543210 x y arg_0123456789876543210 _z_0123456789876543210 = x+ type family Lambda_0123456789876543210 x y t where+ Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210+ type Lambda_0123456789876543210Sym3 t t t =+ Lambda_0123456789876543210 t t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym2 l l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym2 l l) arg) (Lambda_0123456789876543210Sym3 l l arg) =>+ Lambda_0123456789876543210Sym2KindInference+ type instance Apply (Lambda_0123456789876543210Sym2 l l) l = Lambda_0123456789876543210 l l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 '[_z_0123456789876543210,+ y_0123456789876543210,+ Succ _z_0123456789876543210] = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 '[_z_0123456789876543210,+ _z_0123456789876543210,+ Succ y_0123456789876543210] = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 '(y_0123456789876543210,+ _z_0123456789876543210,+ _z_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 '(_z_0123456789876543210,+ y_0123456789876543210,+ _z_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 '(_z_0123456789876543210,+ _z_0123456789876543210,+ y_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 (Pair (Pair y_0123456789876543210 _z_0123456789876543210) _z_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 (Pair (Pair _z_0123456789876543210 y_0123456789876543210) _z_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 (Pair (Pair _z_0123456789876543210 _z_0123456789876543210) y_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 (Pair y_0123456789876543210 _z_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 (Pair _z_0123456789876543210 y_0123456789876543210) = y_0123456789876543210+ type SillySym1 (t :: a0123456789876543210) = Silly t+ instance SuppressUnusedWarnings SillySym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) SillySym0KindInference) GHC.Tuple.())+ data SillySym0 (l :: TyFun a0123456789876543210 ())+ = forall arg. SameKind (Apply SillySym0 arg) (SillySym1 arg) =>+ SillySym0KindInference+ type instance Apply SillySym0 l = Silly l+ type Foo2Sym1 (t :: (a0123456789876543210, b0123456789876543210)) =+ Foo2 t+ instance SuppressUnusedWarnings Foo2Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo2Sym0KindInference) GHC.Tuple.())+ data Foo2Sym0 (l :: TyFun (a0123456789876543210,+ b0123456789876543210) a0123456789876543210)+ = forall arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>+ Foo2Sym0KindInference+ type instance Apply Foo2Sym0 l = Foo2 l+ type Foo1Sym1 (t :: (a0123456789876543210, b0123456789876543210)) =+ Foo1 t+ instance SuppressUnusedWarnings Foo1Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Foo1Sym0KindInference) GHC.Tuple.())+ data Foo1Sym0 (l :: TyFun (a0123456789876543210,+ b0123456789876543210) a0123456789876543210)+ = forall arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>+ Foo1Sym0KindInference+ type instance Apply Foo1Sym0 l = Foo1 l+ type LszSym0 = Lsz+ type BlimySym0 = Blimy+ type TfSym0 = Tf+ type TjzSym0 = Tjz+ type TtSym0 = Tt+ type JzSym0 = Jz+ type ZzSym0 = Zz+ type FlsSym0 = Fls+ type SzSym0 = Sz+ type LzSym0 = Lz+ type X_0123456789876543210Sym0 = X_0123456789876543210+ type X_0123456789876543210Sym0 = X_0123456789876543210+ type X_0123456789876543210Sym0 = X_0123456789876543210+ type X_0123456789876543210Sym0 = X_0123456789876543210+ type family Silly (a :: a) :: () where+ Silly x = Case_0123456789876543210 x x+ type family Foo2 (a :: (a, b)) :: a where+ Foo2 '(x,+ y) = Case_0123456789876543210 x y (Let0123456789876543210TSym2 x y)+ type family Foo1 (a :: (a, b)) :: a where+ Foo1 '(x,+ y) = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y+ type family Lsz :: Nat where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family Blimy where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family Tf where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family Tjz where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family Tt where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family Jz where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family Zz where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family Fls :: Bool where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family Sz where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family Lz where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family X_0123456789876543210 where+ = PrSym0+ type family X_0123456789876543210 where+ = ComplexSym0+ type family X_0123456789876543210 where+ = TupleSym0+ type family X_0123456789876543210 where+ = AListSym0+ sSilly :: forall (t :: a). Sing t -> Sing (Apply SillySym0 t :: ())+ sFoo2 ::+ forall (t :: (a, b)). Sing t -> Sing (Apply Foo2Sym0 t :: a)+ sFoo1 ::+ forall (t :: (a, b)). Sing t -> Sing (Apply Foo1Sym0 t :: a)+ sLsz :: Sing (LszSym0 :: Nat)+ sBlimy :: Sing BlimySym0+ sTf :: Sing TfSym0+ sTjz :: Sing TjzSym0+ sTt :: Sing TtSym0+ sJz :: Sing JzSym0+ sZz :: Sing ZzSym0+ sFls :: Sing (FlsSym0 :: Bool)+ sSz :: Sing SzSym0+ sLz :: Sing LzSym0+ sX_0123456789876543210 :: Sing X_0123456789876543210Sym0+ sX_0123456789876543210 :: Sing X_0123456789876543210Sym0+ sX_0123456789876543210 :: Sing X_0123456789876543210Sym0+ sX_0123456789876543210 :: Sing X_0123456789876543210Sym0+ sSilly (sX :: Sing x)+ = case sX of { _ -> STuple0 } ::+ Sing (Case_0123456789876543210 x x :: ())+ sFoo2 (STuple2 (sX :: Sing x) (sY :: Sing y))+ = let+ sT :: Sing (Let0123456789876543210TSym2 x y)+ sT+ = (applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sX)) sY+ in case sT of {+ STuple2 (sA :: Sing a) (sB :: Sing b)+ -> (applySing+ ((singFun1+ @(Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) a) b))+ (\ sArg_0123456789876543210+ -> case sArg_0123456789876543210 of {+ _ :: Sing arg_0123456789876543210+ -> case sArg_0123456789876543210 of { _ -> sA } ::+ Sing (Case_0123456789876543210 x y a b arg_0123456789876543210 arg_0123456789876543210) })))+ sB } ::+ Sing (Case_0123456789876543210 x y (Let0123456789876543210TSym2 x y) :: a)+ sFoo1 (STuple2 (sX :: Sing x) (sY :: Sing y))+ = (applySing+ ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 x) y))+ (\ sArg_0123456789876543210+ -> case sArg_0123456789876543210 of {+ _ :: Sing arg_0123456789876543210+ -> case sArg_0123456789876543210 of { _ -> sX } ::+ Sing (Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210) })))+ sY+ sLsz+ = case sX_0123456789876543210 of {+ SCons _+ (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210)+ (SCons (SSucc _) SNil))+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Nat)+ sBlimy+ = case sX_0123456789876543210 of {+ SCons _+ (SCons _+ (SCons (SSucc (sY_0123456789876543210 :: Sing y_0123456789876543210))+ SNil))+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0)+ sTf+ = case sX_0123456789876543210 of {+ STuple3 (sY_0123456789876543210 :: Sing y_0123456789876543210) _ _+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0)+ sTjz+ = case sX_0123456789876543210 of {+ STuple3 _ (sY_0123456789876543210 :: Sing y_0123456789876543210) _+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0)+ sTt+ = case sX_0123456789876543210 of {+ STuple3 _ _ (sY_0123456789876543210 :: Sing y_0123456789876543210)+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0)+ sJz+ = case sX_0123456789876543210 of {+ SPair (SPair (sY_0123456789876543210 :: Sing y_0123456789876543210)+ _)+ _+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0)+ sZz+ = case sX_0123456789876543210 of {+ SPair (SPair _+ (sY_0123456789876543210 :: Sing y_0123456789876543210))+ _+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0)+ sFls+ = case sX_0123456789876543210 of {+ SPair (SPair _ _)+ (sY_0123456789876543210 :: Sing y_0123456789876543210)+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)+ sSz+ = case sX_0123456789876543210 of {+ SPair (sY_0123456789876543210 :: Sing y_0123456789876543210) _+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0)+ sLz+ = case sX_0123456789876543210 of {+ SPair _ (sY_0123456789876543210 :: Sing y_0123456789876543210)+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0)+ sX_0123456789876543210 = sPr+ sX_0123456789876543210 = sComplex+ sX_0123456789876543210 = sTuple+ sX_0123456789876543210 = sAList
+ tests/compile-and-dump/Singletons/PolyKinds.ghc82.template view
@@ -0,0 +1,22 @@+Singletons/PolyKinds.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| class Cls (a :: k) where+ fff :: Proxy (a :: k) -> () |]+ ======>+ class Cls (a :: k) where+ fff :: Proxy (a :: k) -> ()+ type FffSym1 (t :: Proxy (a0123456789876543210 :: k0123456789876543210)) =+ Fff t+ instance SuppressUnusedWarnings FffSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FffSym0KindInference) GHC.Tuple.())+ data FffSym0 (l :: TyFun (Proxy (a0123456789876543210 :: k0123456789876543210)) ())+ = forall arg. SameKind (Apply FffSym0 arg) (FffSym1 arg) =>+ FffSym0KindInference+ type instance Apply FffSym0 l = Fff l+ class PCls (a :: k) where+ type Fff (arg :: Proxy (a :: k)) :: ()+ class SCls (a :: k) where+ sFff ::+ forall (t :: Proxy (a :: k)).+ Sing t -> Sing (Apply FffSym0 t :: ())
+ tests/compile-and-dump/Singletons/PolyKinds.hs view
@@ -0,0 +1,8 @@+module Singletons.PolyKinds where++import Data.Singletons.TH++$(singletons [d|+ class Cls (a :: k) where+ fff :: Proxy (a :: k) -> ()+ |])
+ tests/compile-and-dump/Singletons/PolyKindsApp.ghc82.template view
@@ -0,0 +1,12 @@+Singletons/PolyKindsApp.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| class Cls (a :: k -> Type) where+ fff :: (a :: k -> Type) (b :: k) |]+ ======>+ class Cls (a :: k -> Type) where+ fff :: (a :: k -> Type) (b :: k)+ type FffSym0 = Fff+ class PCls (a :: k -> Type) where+ type Fff :: (a :: k -> Type) (b :: k)+ class SCls (a :: k -> Type) where+ sFff :: Sing (FffSym0 :: (a :: k -> Type) (b :: k))
+ tests/compile-and-dump/Singletons/PolyKindsApp.hs view
@@ -0,0 +1,12 @@+module Singletons.PolyKindsApp where++import Data.Kind+import Data.Singletons.TH++$(singletons [d|+ class Cls (a :: k -> Type) where+ fff :: (a :: k -> Type) (b :: k)++ -- instance Cls Proxy where+ -- fff = Proxy+ |])
− tests/compile-and-dump/Singletons/Records.ghc80.template
@@ -1,59 +0,0 @@-Singletons/Records.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| data Record a = MkRecord {field1 :: a, field2 :: Bool} |]- ======>- data Record a = MkRecord {field1 :: a, field2 :: Bool}- type Field1Sym1 (t :: Record a0123456789) = Field1 t- instance SuppressUnusedWarnings Field1Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Field1Sym0KindInference GHC.Tuple.())- data Field1Sym0 (l :: TyFun (Record a0123456789) a0123456789)- = forall arg. KindOf (Apply Field1Sym0 arg) ~ KindOf (Field1Sym1 arg) =>- Field1Sym0KindInference- type instance Apply Field1Sym0 l = Field1Sym1 l- type Field2Sym1 (t :: Record a0123456789) = Field2 t- instance SuppressUnusedWarnings Field2Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Field2Sym0KindInference GHC.Tuple.())- data Field2Sym0 (l :: TyFun (Record a0123456789) Bool)- = forall arg. KindOf (Apply Field2Sym0 arg) ~ KindOf (Field2Sym1 arg) =>- Field2Sym0KindInference- type instance Apply Field2Sym0 l = Field2Sym1 l- type family Field1 (a :: Record a) :: a where- Field1 (MkRecord field _z_0123456789) = field- type family Field2 (a :: Record a) :: Bool where- Field2 (MkRecord _z_0123456789 field) = field- type MkRecordSym2 (t :: a0123456789) (t :: Bool) = MkRecord t t- instance SuppressUnusedWarnings MkRecordSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) MkRecordSym1KindInference GHC.Tuple.())- data MkRecordSym1 (l :: a0123456789)- (l :: TyFun Bool (Record a0123456789))- = forall arg. KindOf (Apply (MkRecordSym1 l) arg) ~ KindOf (MkRecordSym2 l arg) =>- MkRecordSym1KindInference- type instance Apply (MkRecordSym1 l) l = MkRecordSym2 l l- instance SuppressUnusedWarnings MkRecordSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) MkRecordSym0KindInference GHC.Tuple.())- data MkRecordSym0 (l :: TyFun a0123456789 (TyFun Bool (Record a0123456789)- -> GHC.Types.Type))- = forall arg. KindOf (Apply MkRecordSym0 arg) ~ KindOf (MkRecordSym1 arg) =>- MkRecordSym0KindInference- type instance Apply MkRecordSym0 l = MkRecordSym1 l- data instance Sing (z :: Record a)- = forall (n :: a) (n :: Bool). z ~ MkRecord n n =>- SMkRecord {sField1 :: (Sing (n :: a)),- sField2 :: (Sing (n :: Bool))}- type SRecord = (Sing :: Record a -> GHC.Types.Type)- instance SingKind a => SingKind (Record a) where- type DemoteRep (Record a) = Record (DemoteRep a)- fromSing (SMkRecord b b) = MkRecord (fromSing b) (fromSing b)- toSing (MkRecord b b)- = case- GHC.Tuple.(,) (toSing b :: SomeSing a) (toSing b :: SomeSing Bool)- of {- GHC.Tuple.(,) (SomeSing c) (SomeSing c)- -> SomeSing (SMkRecord c c) }- instance (SingI n, SingI n) =>- SingI (MkRecord (n :: a) (n :: Bool)) where- sing = SMkRecord sing sing
+ tests/compile-and-dump/Singletons/Records.ghc82.template view
@@ -0,0 +1,60 @@+Singletons/Records.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| data Record a = MkRecord {field1 :: a, field2 :: Bool} |]+ ======>+ data Record a = MkRecord {field1 :: a, field2 :: Bool}+ type Field1Sym1 (t :: Record a0123456789876543210) = Field1 t+ instance SuppressUnusedWarnings Field1Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Field1Sym0KindInference) GHC.Tuple.())+ data Field1Sym0 (l :: TyFun (Record a0123456789876543210) a0123456789876543210)+ = forall arg. SameKind (Apply Field1Sym0 arg) (Field1Sym1 arg) =>+ Field1Sym0KindInference+ type instance Apply Field1Sym0 l = Field1 l+ type Field2Sym1 (t :: Record a0123456789876543210) = Field2 t+ instance SuppressUnusedWarnings Field2Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Field2Sym0KindInference) GHC.Tuple.())+ data Field2Sym0 (l :: TyFun (Record a0123456789876543210) Bool)+ = forall arg. SameKind (Apply Field2Sym0 arg) (Field2Sym1 arg) =>+ Field2Sym0KindInference+ type instance Apply Field2Sym0 l = Field2 l+ type family Field1 (a :: Record a) :: a where+ Field1 (MkRecord field _z_0123456789876543210) = field+ type family Field2 (a :: Record a) :: Bool where+ Field2 (MkRecord _z_0123456789876543210 field) = field+ type MkRecordSym2 (t :: a0123456789876543210) (t :: Bool) =+ MkRecord t t+ instance SuppressUnusedWarnings MkRecordSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) MkRecordSym1KindInference) GHC.Tuple.())+ data MkRecordSym1 (l :: a0123456789876543210) (l :: TyFun Bool (Record a0123456789876543210))+ = forall arg. SameKind (Apply (MkRecordSym1 l) arg) (MkRecordSym2 l arg) =>+ MkRecordSym1KindInference+ type instance Apply (MkRecordSym1 l) l = MkRecord l l+ instance SuppressUnusedWarnings MkRecordSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) MkRecordSym0KindInference) GHC.Tuple.())+ data MkRecordSym0 (l :: TyFun a0123456789876543210 (TyFun Bool (Record a0123456789876543210)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply MkRecordSym0 arg) (MkRecordSym1 arg) =>+ MkRecordSym0KindInference+ type instance Apply MkRecordSym0 l = MkRecordSym1 l+ data instance Sing (z :: Record a)+ = forall (n :: a) (n :: Bool). z ~ MkRecord n n =>+ SMkRecord {sField1 :: (Sing (n :: a)),+ sField2 :: (Sing (n :: Bool))}+ type SRecord = (Sing :: Record a -> GHC.Types.Type)+ instance SingKind a => SingKind (Record a) where+ type Demote (Record a) = Record (Demote a)+ fromSing (SMkRecord b b) = (MkRecord (fromSing b)) (fromSing b)+ toSing (MkRecord b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing a))+ (toSing b :: SomeSing Bool)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c)+ -> SomeSing ((SMkRecord c) c) }+ instance (SingI n, SingI n) =>+ SingI (MkRecord (n :: a) (n :: Bool)) where+ sing = (SMkRecord sing) sing
− tests/compile-and-dump/Singletons/ReturnFunc.ghc80.template
@@ -1,95 +0,0 @@-Singletons/ReturnFunc.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| returnFunc :: Nat -> Nat -> Nat- returnFunc _ = Succ- id :: a -> a- id x = x- idFoo :: c -> a -> a- idFoo _ = id |]- ======>- returnFunc :: Nat -> Nat -> Nat- returnFunc _ = Succ- id :: forall a. a -> a- id x = x- idFoo :: forall c a. c -> a -> a- idFoo _ = id- type IdSym1 (t :: a0123456789) = Id t- instance SuppressUnusedWarnings IdSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) IdSym0KindInference GHC.Tuple.())- data IdSym0 (l :: TyFun a0123456789 a0123456789)- = forall arg. KindOf (Apply IdSym0 arg) ~ KindOf (IdSym1 arg) =>- IdSym0KindInference- type instance Apply IdSym0 l = IdSym1 l- type IdFooSym2 (t :: c0123456789) (t :: a0123456789) = IdFoo t t- instance SuppressUnusedWarnings IdFooSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) IdFooSym1KindInference GHC.Tuple.())- data IdFooSym1 (l :: c0123456789)- (l :: TyFun a0123456789 a0123456789)- = forall arg. KindOf (Apply (IdFooSym1 l) arg) ~ KindOf (IdFooSym2 l arg) =>- IdFooSym1KindInference- type instance Apply (IdFooSym1 l) l = IdFooSym2 l l- instance SuppressUnusedWarnings IdFooSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) IdFooSym0KindInference GHC.Tuple.())- data IdFooSym0 (l :: TyFun c0123456789 (TyFun a0123456789 a0123456789- -> GHC.Types.Type))- = forall arg. KindOf (Apply IdFooSym0 arg) ~ KindOf (IdFooSym1 arg) =>- IdFooSym0KindInference- type instance Apply IdFooSym0 l = IdFooSym1 l- type ReturnFuncSym2 (t :: Nat) (t :: Nat) = ReturnFunc t t- instance SuppressUnusedWarnings ReturnFuncSym1 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ReturnFuncSym1KindInference GHC.Tuple.())- data ReturnFuncSym1 (l :: Nat) (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply (ReturnFuncSym1 l) arg) ~ KindOf (ReturnFuncSym2 l arg) =>- ReturnFuncSym1KindInference- type instance Apply (ReturnFuncSym1 l) l = ReturnFuncSym2 l l- instance SuppressUnusedWarnings ReturnFuncSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) ReturnFuncSym0KindInference GHC.Tuple.())- data ReturnFuncSym0 (l :: TyFun Nat (TyFun Nat Nat- -> GHC.Types.Type))- = forall arg. KindOf (Apply ReturnFuncSym0 arg) ~ KindOf (ReturnFuncSym1 arg) =>- ReturnFuncSym0KindInference- type instance Apply ReturnFuncSym0 l = ReturnFuncSym1 l- type family Id (a :: a) :: a where- Id x = x- type family IdFoo (a :: c) (a :: a) :: a where- IdFoo _z_0123456789 a_0123456789 = Apply IdSym0 a_0123456789- type family ReturnFunc (a :: Nat) (a :: Nat) :: Nat where- ReturnFunc _z_0123456789 a_0123456789 = Apply SuccSym0 a_0123456789- sId :: forall (t :: a). Sing t -> Sing (Apply IdSym0 t :: a)- sIdFoo ::- forall (t :: c) (t :: a).- Sing t -> Sing t -> Sing (Apply (Apply IdFooSym0 t) t :: a)- sReturnFunc ::- forall (t :: Nat) (t :: Nat).- Sing t -> Sing t -> Sing (Apply (Apply ReturnFuncSym0 t) t :: Nat)- sId sX- = let- lambda :: forall x. t ~ x => Sing x -> Sing (Apply IdSym0 t :: a)- lambda x = x- in lambda sX- sIdFoo _s_z_0123456789 sA_0123456789- = let- lambda ::- forall _z_0123456789 a_0123456789.- (t ~ _z_0123456789, t ~ a_0123456789) =>- Sing _z_0123456789- -> Sing a_0123456789 -> Sing (Apply (Apply IdFooSym0 t) t :: a)- lambda _z_0123456789 a_0123456789- = applySing (singFun1 (Proxy :: Proxy IdSym0) sId) a_0123456789- in lambda _s_z_0123456789 sA_0123456789- sReturnFunc _s_z_0123456789 sA_0123456789- = let- lambda ::- forall _z_0123456789 a_0123456789.- (t ~ _z_0123456789, t ~ a_0123456789) =>- Sing _z_0123456789- -> Sing a_0123456789- -> Sing (Apply (Apply ReturnFuncSym0 t) t :: Nat)- lambda _z_0123456789 a_0123456789- = applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) a_0123456789- in lambda _s_z_0123456789 sA_0123456789
+ tests/compile-and-dump/Singletons/ReturnFunc.ghc82.template view
@@ -0,0 +1,76 @@+Singletons/ReturnFunc.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| returnFunc :: Nat -> Nat -> Nat+ returnFunc _ = Succ+ id :: a -> a+ id x = x+ idFoo :: c -> a -> a+ idFoo _ = id |]+ ======>+ returnFunc :: Nat -> Nat -> Nat+ returnFunc _ = Succ+ id :: a -> a+ id x = x+ idFoo :: c -> a -> a+ idFoo _ = id+ type IdSym1 (t :: a0123456789876543210) = Id t+ instance SuppressUnusedWarnings IdSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) IdSym0KindInference) GHC.Tuple.())+ data IdSym0 (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply IdSym0 arg) (IdSym1 arg) =>+ IdSym0KindInference+ type instance Apply IdSym0 l = Id l+ type IdFooSym2 (t :: c0123456789876543210) (t :: a0123456789876543210) =+ IdFoo t t+ instance SuppressUnusedWarnings IdFooSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) IdFooSym1KindInference) GHC.Tuple.())+ data IdFooSym1 (l :: c0123456789876543210) (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply (IdFooSym1 l) arg) (IdFooSym2 l arg) =>+ IdFooSym1KindInference+ type instance Apply (IdFooSym1 l) l = IdFoo l l+ instance SuppressUnusedWarnings IdFooSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) IdFooSym0KindInference) GHC.Tuple.())+ data IdFooSym0 (l :: TyFun c0123456789876543210 (TyFun a0123456789876543210 a0123456789876543210+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply IdFooSym0 arg) (IdFooSym1 arg) =>+ IdFooSym0KindInference+ type instance Apply IdFooSym0 l = IdFooSym1 l+ type ReturnFuncSym2 (t :: Nat) (t :: Nat) = ReturnFunc t t+ instance SuppressUnusedWarnings ReturnFuncSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ReturnFuncSym1KindInference) GHC.Tuple.())+ data ReturnFuncSym1 (l :: Nat) (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply (ReturnFuncSym1 l) arg) (ReturnFuncSym2 l arg) =>+ ReturnFuncSym1KindInference+ type instance Apply (ReturnFuncSym1 l) l = ReturnFunc l l+ instance SuppressUnusedWarnings ReturnFuncSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ReturnFuncSym0KindInference) GHC.Tuple.())+ data ReturnFuncSym0 (l :: TyFun Nat (TyFun Nat Nat+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply ReturnFuncSym0 arg) (ReturnFuncSym1 arg) =>+ ReturnFuncSym0KindInference+ type instance Apply ReturnFuncSym0 l = ReturnFuncSym1 l+ type family Id (a :: a) :: a where+ Id x = x+ type family IdFoo (a :: c) (a :: a) :: a where+ IdFoo _z_0123456789876543210 a_0123456789876543210 = Apply IdSym0 a_0123456789876543210+ type family ReturnFunc (a :: Nat) (a :: Nat) :: Nat where+ ReturnFunc _z_0123456789876543210 a_0123456789876543210 = Apply SuccSym0 a_0123456789876543210+ sId :: forall (t :: a). Sing t -> Sing (Apply IdSym0 t :: a)+ sIdFoo ::+ forall (t :: c) (t :: a).+ Sing t -> Sing t -> Sing (Apply (Apply IdFooSym0 t) t :: a)+ sReturnFunc ::+ forall (t :: Nat) (t :: Nat).+ Sing t -> Sing t -> Sing (Apply (Apply ReturnFuncSym0 t) t :: Nat)+ sId (sX :: Sing x) = sX+ sIdFoo _ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing ((singFun1 @IdSym0) sId)) sA_0123456789876543210+ sReturnFunc+ _+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing ((singFun1 @SuccSym0) SSucc)) sA_0123456789876543210
− tests/compile-and-dump/Singletons/Sections.ghc80.template
@@ -1,144 +0,0 @@-Singletons/Sections.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| (+) :: Nat -> Nat -> Nat- Zero + m = m- (Succ n) + m = Succ (n + m)- foo1 :: [Nat]- foo1 = map ((Succ Zero) +) [Zero, Succ Zero]- foo2 :: [Nat]- foo2 = map (+ (Succ Zero)) [Zero, Succ Zero]- foo3 :: [Nat]- foo3 = zipWith (+) [Succ Zero, Succ Zero] [Zero, Succ Zero] |]- ======>- (+) :: Nat -> Nat -> Nat- (+) Zero m = m- (+) (Succ n) m = Succ (n + m)- foo1 :: [Nat]- foo1 = map (Succ Zero +) [Zero, Succ Zero]- foo2 :: [Nat]- foo2 = map (+ Succ Zero) [Zero, Succ Zero]- foo3 :: [Nat]- foo3 = zipWith (+) [Succ Zero, Succ Zero] [Zero, Succ Zero]- type family Lambda_0123456789 t where- Lambda_0123456789 lhs_0123456789 = Apply (Apply (:+$) lhs_0123456789) (Apply SuccSym0 ZeroSym0)- type Lambda_0123456789Sym1 t = Lambda_0123456789 t- instance SuppressUnusedWarnings Lambda_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Lambda_0123456789Sym0KindInference GHC.Tuple.())- data Lambda_0123456789Sym0 l- = forall arg. KindOf (Apply Lambda_0123456789Sym0 arg) ~ KindOf (Lambda_0123456789Sym1 arg) =>- Lambda_0123456789Sym0KindInference- type instance Apply Lambda_0123456789Sym0 l = Lambda_0123456789Sym1 l- type (:+$$$) (t :: Nat) (t :: Nat) = (:+) t t- instance SuppressUnusedWarnings (:+$$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:+$$###) GHC.Tuple.())- data (:+$$) (l :: Nat) (l :: TyFun Nat Nat)- = forall arg. KindOf (Apply ((:+$$) l) arg) ~ KindOf ((:+$$$) l arg) =>- (:+$$###)- type instance Apply ((:+$$) l) l = (:+$$$) l l- instance SuppressUnusedWarnings (:+$) where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) (:+$###) GHC.Tuple.())- data (:+$) (l :: TyFun Nat (TyFun Nat Nat -> GHC.Types.Type))- = forall arg. KindOf (Apply (:+$) arg) ~ KindOf ((:+$$) arg) =>- (:+$###)- type instance Apply (:+$) l = (:+$$) l- type Foo1Sym0 = Foo1- type Foo2Sym0 = Foo2- type Foo3Sym0 = Foo3- type family (:+) (a :: Nat) (a :: Nat) :: Nat where- (:+) Zero m = m- (:+) (Succ n) m = Apply SuccSym0 (Apply (Apply (:+$) n) m)- type family Foo1 :: [Nat] where- Foo1 = Apply (Apply MapSym0 (Apply (:+$) (Apply SuccSym0 ZeroSym0))) (Apply (Apply (:$) ZeroSym0) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) '[]))- type family Foo2 :: [Nat] where- Foo2 = Apply (Apply MapSym0 Lambda_0123456789Sym0) (Apply (Apply (:$) ZeroSym0) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) '[]))- type family Foo3 :: [Nat] where- Foo3 = Apply (Apply (Apply ZipWithSym0 (:+$)) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) '[]))) (Apply (Apply (:$) ZeroSym0) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) '[]))- (%:+) ::- forall (t :: Nat) (t :: Nat).- Sing t -> Sing t -> Sing (Apply (Apply (:+$) t) t :: Nat)- sFoo1 :: Sing (Foo1Sym0 :: [Nat])- sFoo2 :: Sing (Foo2Sym0 :: [Nat])- sFoo3 :: Sing (Foo3Sym0 :: [Nat])- (%:+) SZero sM- = let- lambda ::- forall m.- (t ~ ZeroSym0, t ~ m) =>- Sing m -> Sing (Apply (Apply (:+$) t) t :: Nat)- lambda m = m- in lambda sM- (%:+) (SSucc sN) sM- = let- lambda ::- forall n m.- (t ~ Apply SuccSym0 n, t ~ m) =>- Sing n -> Sing m -> Sing (Apply (Apply (:+$) t) t :: Nat)- lambda n m- = applySing- (singFun1 (Proxy :: Proxy SuccSym0) SSucc)- (applySing (applySing (singFun2 (Proxy :: Proxy (:+$)) (%:+)) n) m)- in lambda sN sM- sFoo1- = applySing- (applySing- (singFun2 (Proxy :: Proxy MapSym0) sMap)- (applySing- (singFun2 (Proxy :: Proxy (:+$)) (%:+))- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero)))- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SZero)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- SNil))- sFoo2- = applySing- (applySing- (singFun2 (Proxy :: Proxy MapSym0) sMap)- (singFun1- (Proxy :: Proxy Lambda_0123456789Sym0)- (\ sLhs_0123456789- -> let- lambda ::- forall lhs_0123456789.- Sing lhs_0123456789- -> Sing (Apply Lambda_0123456789Sym0 lhs_0123456789)- lambda lhs_0123456789- = applySing- (applySing (singFun2 (Proxy :: Proxy (:+$)) (%:+)) lhs_0123456789)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero)- in lambda sLhs_0123456789)))- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SZero)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- SNil))- sFoo3- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy ZipWithSym0) sZipWith)- (singFun2 (Proxy :: Proxy (:+$)) (%:+)))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- SNil)))- (applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SZero)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) SSucc) SZero))- SNil))
+ tests/compile-and-dump/Singletons/Sections.ghc82.template view
@@ -0,0 +1,112 @@+Singletons/Sections.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| (+) :: Nat -> Nat -> Nat+ Zero + m = m+ (Succ n) + m = Succ (n + m)+ foo1 :: [Nat]+ foo1 = map ((Succ Zero) +) [Zero, Succ Zero]+ foo2 :: [Nat]+ foo2 = map (+ (Succ Zero)) [Zero, Succ Zero]+ foo3 :: [Nat]+ foo3 = zipWith (+) [Succ Zero, Succ Zero] [Zero, Succ Zero] |]+ ======>+ (+) :: Nat -> Nat -> Nat+ (+) Zero m = m+ (+) (Succ n) m = Succ (n + m)+ foo1 :: [Nat]+ foo1 = (map (Succ Zero +)) [Zero, Succ Zero]+ foo2 :: [Nat]+ foo2 = (map (+ Succ Zero)) [Zero, Succ Zero]+ foo3 :: [Nat]+ foo3 = ((zipWith (+)) [Succ Zero, Succ Zero]) [Zero, Succ Zero]+ type family Lambda_0123456789876543210 t where+ Lambda_0123456789876543210 lhs_0123456789876543210 = Apply (Apply (:+$) lhs_0123456789876543210) (Apply SuccSym0 ZeroSym0)+ type Lambda_0123456789876543210Sym1 t =+ Lambda_0123456789876543210 t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210 l+ type (:+$$$) (t :: Nat) (t :: Nat) = (:+) t t+ instance SuppressUnusedWarnings (:+$$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:+$$###)) GHC.Tuple.())+ data (:+$$) (l :: Nat) (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply ((:+$$) l) arg) ((:+$$$) l arg) =>+ (:+$$###)+ type instance Apply ((:+$$) l) l = (:+) l l+ instance SuppressUnusedWarnings (:+$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:+$###)) GHC.Tuple.())+ data (:+$) (l :: TyFun Nat (TyFun Nat Nat -> GHC.Types.Type))+ = forall arg. SameKind (Apply (:+$) arg) ((:+$$) arg) => (:+$###)+ type instance Apply (:+$) l = (:+$$) l+ type Foo1Sym0 = Foo1+ type Foo2Sym0 = Foo2+ type Foo3Sym0 = Foo3+ type family (:+) (a :: Nat) (a :: Nat) :: Nat where+ (:+) Zero m = m+ (:+) (Succ n) m = Apply SuccSym0 (Apply (Apply (:+$) n) m)+ type family Foo1 :: [Nat] where+ = Apply (Apply MapSym0 (Apply (:+$) (Apply SuccSym0 ZeroSym0))) (Apply (Apply (:$) ZeroSym0) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) '[]))+ type family Foo2 :: [Nat] where+ = Apply (Apply MapSym0 Lambda_0123456789876543210Sym0) (Apply (Apply (:$) ZeroSym0) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) '[]))+ type family Foo3 :: [Nat] where+ = Apply (Apply (Apply ZipWithSym0 (:+$)) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) '[]))) (Apply (Apply (:$) ZeroSym0) (Apply (Apply (:$) (Apply SuccSym0 ZeroSym0)) '[]))+ (%:+) ::+ forall (t :: Nat) (t :: Nat).+ Sing t -> Sing t -> Sing (Apply (Apply (:+$) t) t :: Nat)+ sFoo1 :: Sing (Foo1Sym0 :: [Nat])+ sFoo2 :: Sing (Foo2Sym0 :: [Nat])+ sFoo3 :: Sing (Foo3Sym0 :: [Nat])+ (%:+) SZero (sM :: Sing m) = sM+ (%:+) (SSucc (sN :: Sing n)) (sM :: Sing m)+ = (applySing ((singFun1 @SuccSym0) SSucc))+ ((applySing ((applySing ((singFun2 @(:+$)) (%:+))) sN)) sM)+ sFoo1+ = (applySing+ ((applySing ((singFun2 @MapSym0) sMap))+ ((applySing ((singFun2 @(:+$)) (%:+)))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SZero))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ SNil))+ sFoo2+ = (applySing+ ((applySing ((singFun2 @MapSym0) sMap))+ ((singFun1 @Lambda_0123456789876543210Sym0)+ (\ sLhs_0123456789876543210+ -> case sLhs_0123456789876543210 of {+ _ :: Sing lhs_0123456789876543210+ -> (applySing+ ((applySing ((singFun2 @(:+$)) (%:+))) sLhs_0123456789876543210))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero) }))))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SZero))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ SNil))+ sFoo3+ = (applySing+ ((applySing+ ((applySing ((singFun3 @ZipWithSym0) sZipWith))+ ((singFun2 @(:+$)) (%:+))))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ SNil))))+ ((applySing ((applySing ((singFun2 @(:$)) SCons)) SZero))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))+ SNil))
− tests/compile-and-dump/Singletons/Star.ghc80.template
@@ -1,575 +0,0 @@-Singletons/Star.hs:0:0:: Splicing declarations- singletonStar [''Nat, ''Int, ''String, ''Maybe, ''Vec]- ======>- data Rep- = Singletons.Star.Nat |- Singletons.Star.Int |- Singletons.Star.String |- Singletons.Star.Maybe Rep |- Singletons.Star.Vec Rep Nat- deriving (Eq, Show, Read)- type family Equals_0123456789 (a :: Type) (b :: Type) :: Bool where- Equals_0123456789 Nat Nat = TrueSym0- Equals_0123456789 Int Int = TrueSym0- Equals_0123456789 String String = TrueSym0- Equals_0123456789 (Maybe a) (Maybe b) = (:==) a b- Equals_0123456789 (Vec a a) (Vec b b) = (:&&) ((:==) a b) ((:==) a b)- Equals_0123456789 (a :: Type) (b :: Type) = FalseSym0- instance PEq (Proxy :: Proxy Type) where- type (:==) (a :: Type) (b :: Type) = Equals_0123456789 a b- type NatSym0 = Nat- type IntSym0 = Int- type StringSym0 = String- type MaybeSym1 (t :: Type) = Maybe t- instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings MaybeSym0 where- Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings _- = snd (GHC.Tuple.(,) MaybeSym0KindInference GHC.Tuple.())- data MaybeSym0 (l :: TyFun Type Type)- = forall arg. KindOf (Apply MaybeSym0 arg) ~ KindOf (MaybeSym1 arg) =>- MaybeSym0KindInference- type instance Apply MaybeSym0 l = MaybeSym1 l- type VecSym2 (t :: Type) (t :: Nat) = Vec t t- instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings VecSym1 where- Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings _- = snd (GHC.Tuple.(,) VecSym1KindInference GHC.Tuple.())- data VecSym1 (l :: Type) (l :: TyFun Nat Type)- = forall arg. KindOf (Apply (VecSym1 l) arg) ~ KindOf (VecSym2 l arg) =>- VecSym1KindInference- type instance Apply (VecSym1 l) l = VecSym2 l l- instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings VecSym0 where- Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings _- = snd (GHC.Tuple.(,) VecSym0KindInference GHC.Tuple.())- data VecSym0 (l :: TyFun Type (TyFun Nat Type -> Type))- = forall arg. KindOf (Apply VecSym0 arg) ~ KindOf (VecSym1 arg) =>- VecSym0KindInference- type instance Apply VecSym0 l = VecSym1 l- type family Compare_0123456789 (a :: Type)- (a :: Type) :: Ordering where- Compare_0123456789 Nat Nat = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]- Compare_0123456789 Int Int = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]- Compare_0123456789 String String = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]- Compare_0123456789 (Maybe a_0123456789) (Maybe b_0123456789) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) '[])- Compare_0123456789 (Vec a_0123456789 a_0123456789) (Vec b_0123456789 b_0123456789) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789) b_0123456789)) '[]))- Compare_0123456789 Nat Int = LTSym0- Compare_0123456789 Nat String = LTSym0- Compare_0123456789 Nat (Maybe _z_0123456789) = LTSym0- Compare_0123456789 Nat (Vec _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 Int Nat = GTSym0- Compare_0123456789 Int String = LTSym0- Compare_0123456789 Int (Maybe _z_0123456789) = LTSym0- Compare_0123456789 Int (Vec _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 String Nat = GTSym0- Compare_0123456789 String Int = GTSym0- Compare_0123456789 String (Maybe _z_0123456789) = LTSym0- Compare_0123456789 String (Vec _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (Maybe _z_0123456789) Nat = GTSym0- Compare_0123456789 (Maybe _z_0123456789) Int = GTSym0- Compare_0123456789 (Maybe _z_0123456789) String = GTSym0- Compare_0123456789 (Maybe _z_0123456789) (Vec _z_0123456789 _z_0123456789) = LTSym0- Compare_0123456789 (Vec _z_0123456789 _z_0123456789) Nat = GTSym0- Compare_0123456789 (Vec _z_0123456789 _z_0123456789) Int = GTSym0- Compare_0123456789 (Vec _z_0123456789 _z_0123456789) String = GTSym0- Compare_0123456789 (Vec _z_0123456789 _z_0123456789) (Maybe _z_0123456789) = GTSym0- type Compare_0123456789Sym2 (t :: Type) (t :: Type) =- Compare_0123456789 t t- instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Compare_0123456789Sym1 where- Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Compare_0123456789Sym1KindInference GHC.Tuple.())- data Compare_0123456789Sym1 (l :: Type) (l :: TyFun Type Ordering)- = forall arg. KindOf (Apply (Compare_0123456789Sym1 l) arg) ~ KindOf (Compare_0123456789Sym2 l arg) =>- Compare_0123456789Sym1KindInference- type instance Apply (Compare_0123456789Sym1 l) l = Compare_0123456789Sym2 l l- instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Compare_0123456789Sym0 where- Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) Compare_0123456789Sym0KindInference GHC.Tuple.())- data Compare_0123456789Sym0 (l :: TyFun Type (TyFun Type Ordering- -> Type))- = forall arg. KindOf (Apply Compare_0123456789Sym0 arg) ~ KindOf (Compare_0123456789Sym1 arg) =>- Compare_0123456789Sym0KindInference- type instance Apply Compare_0123456789Sym0 l = Compare_0123456789Sym1 l- instance POrd (Proxy :: Proxy Type) where- type Compare (a :: Type) (a :: Type) = Apply (Apply Compare_0123456789Sym0 a) a- instance (SOrd Type, SOrd Nat) => SOrd Type where- sCompare ::- forall (t0 :: Type) (t1 :: Type).- Sing t0- -> Sing t1- -> Sing (Apply (Apply (CompareSym0 :: TyFun Type (TyFun Type Ordering- -> Type)- -> Type) t0 :: TyFun Type Ordering- -> Type) t1 :: Ordering)- sCompare SNat SNat- = let- lambda ::- (t0 ~ NatSym0, t1 ~ NatSym0) =>- Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- SNil- in lambda- sCompare SInt SInt- = let- lambda ::- (t0 ~ IntSym0, t1 ~ IntSym0) =>- Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- SNil- in lambda- sCompare SString SString- = let- lambda ::- (t0 ~ StringSym0, t1 ~ StringSym0) =>- Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- SNil- in lambda- sCompare (SMaybe sA_0123456789) (SMaybe sB_0123456789)- = let- lambda ::- forall a_0123456789 b_0123456789.- (t0 ~ Apply MaybeSym0 a_0123456789,- t1 ~ Apply MaybeSym0 b_0123456789) =>- Sing a_0123456789- -> Sing b_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda a_0123456789 b_0123456789- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- SNil)- in lambda sA_0123456789 sB_0123456789- sCompare- (SVec sA_0123456789 sA_0123456789)- (SVec sB_0123456789 sB_0123456789)- = let- lambda ::- forall a_0123456789 a_0123456789 b_0123456789 b_0123456789.- (t0 ~ Apply (Apply VecSym0 a_0123456789) a_0123456789,- t1 ~ Apply (Apply VecSym0 b_0123456789) b_0123456789) =>- Sing a_0123456789- -> Sing a_0123456789- -> Sing b_0123456789- -> Sing b_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda a_0123456789 a_0123456789 b_0123456789 b_0123456789- = applySing- (applySing- (applySing- (singFun3 (Proxy :: Proxy FoldlSym0) sFoldl)- (singFun2 (Proxy :: Proxy ThenCmpSym0) sThenCmp))- SEQ)- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing- (applySing- (singFun2 (Proxy :: Proxy CompareSym0) sCompare) a_0123456789)- b_0123456789))- SNil))- in lambda sA_0123456789 sA_0123456789 sB_0123456789 sB_0123456789- sCompare SNat SInt- = let- lambda ::- (t0 ~ NatSym0, t1 ~ IntSym0) =>- Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda = SLT- in lambda- sCompare SNat SString- = let- lambda ::- (t0 ~ NatSym0, t1 ~ StringSym0) =>- Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda = SLT- in lambda- sCompare SNat (SMaybe _s_z_0123456789)- = let- lambda ::- forall _z_0123456789.- (t0 ~ NatSym0, t1 ~ Apply MaybeSym0 _z_0123456789) =>- Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SLT- in lambda _s_z_0123456789- sCompare SNat (SVec _s_z_0123456789 _s_z_0123456789)- = let- lambda ::- forall _z_0123456789 _z_0123456789.- (t0 ~ NatSym0,- t1 ~ Apply (Apply VecSym0 _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 _z_0123456789 = SLT- in lambda _s_z_0123456789 _s_z_0123456789- sCompare SInt SNat- = let- lambda ::- (t0 ~ IntSym0, t1 ~ NatSym0) =>- Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda = SGT- in lambda- sCompare SInt SString- = let- lambda ::- (t0 ~ IntSym0, t1 ~ StringSym0) =>- Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda = SLT- in lambda- sCompare SInt (SMaybe _s_z_0123456789)- = let- lambda ::- forall _z_0123456789.- (t0 ~ IntSym0, t1 ~ Apply MaybeSym0 _z_0123456789) =>- Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SLT- in lambda _s_z_0123456789- sCompare SInt (SVec _s_z_0123456789 _s_z_0123456789)- = let- lambda ::- forall _z_0123456789 _z_0123456789.- (t0 ~ IntSym0,- t1 ~ Apply (Apply VecSym0 _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 _z_0123456789 = SLT- in lambda _s_z_0123456789 _s_z_0123456789- sCompare SString SNat- = let- lambda ::- (t0 ~ StringSym0, t1 ~ NatSym0) =>- Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda = SGT- in lambda- sCompare SString SInt- = let- lambda ::- (t0 ~ StringSym0, t1 ~ IntSym0) =>- Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda = SGT- in lambda- sCompare SString (SMaybe _s_z_0123456789)- = let- lambda ::- forall _z_0123456789.- (t0 ~ StringSym0, t1 ~ Apply MaybeSym0 _z_0123456789) =>- Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SLT- in lambda _s_z_0123456789- sCompare SString (SVec _s_z_0123456789 _s_z_0123456789)- = let- lambda ::- forall _z_0123456789 _z_0123456789.- (t0 ~ StringSym0,- t1 ~ Apply (Apply VecSym0 _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 _z_0123456789 = SLT- in lambda _s_z_0123456789 _s_z_0123456789- sCompare (SMaybe _s_z_0123456789) SNat- = let- lambda ::- forall _z_0123456789.- (t0 ~ Apply MaybeSym0 _z_0123456789, t1 ~ NatSym0) =>- Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SGT- in lambda _s_z_0123456789- sCompare (SMaybe _s_z_0123456789) SInt- = let- lambda ::- forall _z_0123456789.- (t0 ~ Apply MaybeSym0 _z_0123456789, t1 ~ IntSym0) =>- Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SGT- in lambda _s_z_0123456789- sCompare (SMaybe _s_z_0123456789) SString- = let- lambda ::- forall _z_0123456789.- (t0 ~ Apply MaybeSym0 _z_0123456789, t1 ~ StringSym0) =>- Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 = SGT- in lambda _s_z_0123456789- sCompare- (SMaybe _s_z_0123456789)- (SVec _s_z_0123456789 _s_z_0123456789)- = let- lambda ::- forall _z_0123456789 _z_0123456789 _z_0123456789.- (t0 ~ Apply MaybeSym0 _z_0123456789,- t1 ~ Apply (Apply VecSym0 _z_0123456789) _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 _z_0123456789 _z_0123456789 = SLT- in lambda _s_z_0123456789 _s_z_0123456789 _s_z_0123456789- sCompare (SVec _s_z_0123456789 _s_z_0123456789) SNat- = let- lambda ::- forall _z_0123456789 _z_0123456789.- (t0 ~ Apply (Apply VecSym0 _z_0123456789) _z_0123456789,- t1 ~ NatSym0) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 _z_0123456789 = SGT- in lambda _s_z_0123456789 _s_z_0123456789- sCompare (SVec _s_z_0123456789 _s_z_0123456789) SInt- = let- lambda ::- forall _z_0123456789 _z_0123456789.- (t0 ~ Apply (Apply VecSym0 _z_0123456789) _z_0123456789,- t1 ~ IntSym0) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 _z_0123456789 = SGT- in lambda _s_z_0123456789 _s_z_0123456789- sCompare (SVec _s_z_0123456789 _s_z_0123456789) SString- = let- lambda ::- forall _z_0123456789 _z_0123456789.- (t0 ~ Apply (Apply VecSym0 _z_0123456789) _z_0123456789,- t1 ~ StringSym0) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 _z_0123456789 = SGT- in lambda _s_z_0123456789 _s_z_0123456789- sCompare- (SVec _s_z_0123456789 _s_z_0123456789)- (SMaybe _s_z_0123456789)- = let- lambda ::- forall _z_0123456789 _z_0123456789 _z_0123456789.- (t0 ~ Apply (Apply VecSym0 _z_0123456789) _z_0123456789,- t1 ~ Apply MaybeSym0 _z_0123456789) =>- Sing _z_0123456789- -> Sing _z_0123456789- -> Sing _z_0123456789- -> Sing (Apply (Apply CompareSym0 t0) t1 :: Ordering)- lambda _z_0123456789 _z_0123456789 _z_0123456789 = SGT- in lambda _s_z_0123456789 _s_z_0123456789 _s_z_0123456789- data instance Sing (z :: Type)- = z ~ Nat => SNat |- z ~ Int => SInt |- z ~ String => SString |- forall (n :: Type). z ~ Maybe n => SMaybe (Sing (n :: Type)) |- forall (n :: Type) (n :: Nat). z ~ Vec n n =>- SVec (Sing (n :: Type)) (Sing (n :: Nat))- type SRep = (Sing :: Type -> Type)- instance SingKind Type where- type DemoteRep Type = Rep- fromSing SNat = Singletons.Star.Nat- fromSing SInt = Singletons.Star.Int- fromSing SString = Singletons.Star.String- fromSing (SMaybe b) = Singletons.Star.Maybe (fromSing b)- fromSing (SVec b b) = Singletons.Star.Vec (fromSing b) (fromSing b)- toSing Singletons.Star.Nat = SomeSing SNat- toSing Singletons.Star.Int = SomeSing SInt- toSing Singletons.Star.String = SomeSing SString- toSing (Singletons.Star.Maybe b)- = case toSing b :: SomeSing Type of {- SomeSing c -> SomeSing (SMaybe c) }- toSing (Singletons.Star.Vec b b)- = case- GHC.Tuple.(,)- (toSing b :: SomeSing Type) (toSing b :: SomeSing Nat)- of {- GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing (SVec c c) }- instance SEq Type where- (%:==) SNat SNat = STrue- (%:==) SNat SInt = SFalse- (%:==) SNat SString = SFalse- (%:==) SNat (SMaybe _) = SFalse- (%:==) SNat (SVec _ _) = SFalse- (%:==) SInt SNat = SFalse- (%:==) SInt SInt = STrue- (%:==) SInt SString = SFalse- (%:==) SInt (SMaybe _) = SFalse- (%:==) SInt (SVec _ _) = SFalse- (%:==) SString SNat = SFalse- (%:==) SString SInt = SFalse- (%:==) SString SString = STrue- (%:==) SString (SMaybe _) = SFalse- (%:==) SString (SVec _ _) = SFalse- (%:==) (SMaybe _) SNat = SFalse- (%:==) (SMaybe _) SInt = SFalse- (%:==) (SMaybe _) SString = SFalse- (%:==) (SMaybe a) (SMaybe b) = (%:==) a b- (%:==) (SMaybe _) (SVec _ _) = SFalse- (%:==) (SVec _ _) SNat = SFalse- (%:==) (SVec _ _) SInt = SFalse- (%:==) (SVec _ _) SString = SFalse- (%:==) (SVec _ _) (SMaybe _) = SFalse- (%:==) (SVec a a) (SVec b b) = (%:&&) ((%:==) a b) ((%:==) a b)- instance SDecide Type where- (%~) SNat SNat = Proved Refl- (%~) SNat SInt- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SNat SString- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SNat (SMaybe _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SNat (SVec _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SInt SNat- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SInt SInt = Proved Refl- (%~) SInt SString- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SInt (SMaybe _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SInt (SVec _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SString SNat- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SString SInt- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SString SString = Proved Refl- (%~) SString (SMaybe _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) SString (SVec _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SMaybe _) SNat- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SMaybe _) SInt- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SMaybe _) SString- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SMaybe a) (SMaybe b)- = case (%~) a b of {- Proved Refl -> Proved Refl- Disproved contra- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- (%~) (SMaybe _) (SVec _ _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SVec _ _) SNat- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SVec _ _) SInt- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SVec _ _) SString- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SVec _ _) (SMaybe _)- = Disproved- (\ x- -> case x of {- _ -> error "Empty case reached -- this should be impossible" })- (%~) (SVec a a) (SVec b b)- = case GHC.Tuple.(,) ((%~) a b) ((%~) a b) of {- GHC.Tuple.(,) (Proved Refl) (Proved Refl) -> Proved Refl- GHC.Tuple.(,) (Disproved contra) _- -> Disproved (\ refl -> case refl of { Refl -> contra Refl })- GHC.Tuple.(,) _ (Disproved contra)- -> Disproved (\ refl -> case refl of { Refl -> contra Refl }) }- instance SingI Nat where- sing = SNat- instance SingI Int where- sing = SInt- instance SingI String where- sing = SString- instance SingI n => SingI (Maybe (n :: Type)) where- sing = SMaybe sing- instance (SingI n, SingI n) =>- SingI (Vec (n :: Type) (n :: Nat)) where- sing = SVec sing sing
+ tests/compile-and-dump/Singletons/Star.ghc82.template view
@@ -0,0 +1,364 @@+Singletons/Star.hs:0:0:: Splicing declarations+ singletonStar [''Nat, ''Int, ''String, ''Maybe, ''Vec]+ ======>+ data Rep+ = Singletons.Star.Nat |+ Singletons.Star.Int |+ Singletons.Star.String |+ Singletons.Star.Maybe Rep |+ Singletons.Star.Vec Rep Nat+ deriving (Eq, Show, Read)+ type family Equals_0123456789876543210 (a :: Type) (b :: Type) :: Bool where+ Equals_0123456789876543210 Nat Nat = TrueSym0+ Equals_0123456789876543210 Int Int = TrueSym0+ Equals_0123456789876543210 String String = TrueSym0+ Equals_0123456789876543210 (Maybe a) (Maybe b) = (:==) a b+ Equals_0123456789876543210 (Vec a a) (Vec b b) = (:&&) ((:==) a b) ((:==) a b)+ Equals_0123456789876543210 (a :: Type) (b :: Type) = FalseSym0+ instance PEq Type where+ type (:==) (a :: Type) (b :: Type) = Equals_0123456789876543210 a b+ type NatSym0 = Nat+ type IntSym0 = Int+ type StringSym0 = String+ type MaybeSym1 (t :: Type) = Maybe t+ instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings MaybeSym0 where+ Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) MaybeSym0KindInference) GHC.Tuple.())+ data MaybeSym0 (l :: TyFun Type Type)+ = forall arg. SameKind (Apply MaybeSym0 arg) (MaybeSym1 arg) =>+ MaybeSym0KindInference+ type instance Apply MaybeSym0 l = Maybe l+ type VecSym2 (t :: Type) (t :: Nat) = Vec t t+ instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings VecSym1 where+ Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) VecSym1KindInference) GHC.Tuple.())+ data VecSym1 (l :: Type) (l :: TyFun Nat Type)+ = forall arg. SameKind (Apply (VecSym1 l) arg) (VecSym2 l arg) =>+ VecSym1KindInference+ type instance Apply (VecSym1 l) l = Vec l l+ instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings VecSym0 where+ Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) VecSym0KindInference) GHC.Tuple.())+ data VecSym0 (l :: TyFun Type (TyFun Nat Type -> Type))+ = forall arg. SameKind (Apply VecSym0 arg) (VecSym1 arg) =>+ VecSym0KindInference+ type instance Apply VecSym0 l = VecSym1 l+ type family Compare_0123456789876543210 (a :: Type) (a :: Type) :: Ordering where+ Compare_0123456789876543210 Nat Nat = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]+ Compare_0123456789876543210 Int Int = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]+ Compare_0123456789876543210 String String = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]+ Compare_0123456789876543210 (Maybe a_0123456789876543210) (Maybe b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])+ Compare_0123456789876543210 (Vec a_0123456789876543210 a_0123456789876543210) (Vec b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))+ Compare_0123456789876543210 Nat Int = LTSym0+ Compare_0123456789876543210 Nat String = LTSym0+ Compare_0123456789876543210 Nat (Maybe _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 Nat (Vec _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 Int Nat = GTSym0+ Compare_0123456789876543210 Int String = LTSym0+ Compare_0123456789876543210 Int (Maybe _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 Int (Vec _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 String Nat = GTSym0+ Compare_0123456789876543210 String Int = GTSym0+ Compare_0123456789876543210 String (Maybe _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 String (Vec _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (Maybe _z_0123456789876543210) Nat = GTSym0+ Compare_0123456789876543210 (Maybe _z_0123456789876543210) Int = GTSym0+ Compare_0123456789876543210 (Maybe _z_0123456789876543210) String = GTSym0+ Compare_0123456789876543210 (Maybe _z_0123456789876543210) (Vec _z_0123456789876543210 _z_0123456789876543210) = LTSym0+ Compare_0123456789876543210 (Vec _z_0123456789876543210 _z_0123456789876543210) Nat = GTSym0+ Compare_0123456789876543210 (Vec _z_0123456789876543210 _z_0123456789876543210) Int = GTSym0+ Compare_0123456789876543210 (Vec _z_0123456789876543210 _z_0123456789876543210) String = GTSym0+ Compare_0123456789876543210 (Vec _z_0123456789876543210 _z_0123456789876543210) (Maybe _z_0123456789876543210) = GTSym0+ type Compare_0123456789876543210Sym2 (t :: Type) (t :: Type) =+ Compare_0123456789876543210 t t+ instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Compare_0123456789876543210Sym1 where+ Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym1 (l :: Type) (l :: TyFun Type Ordering)+ = forall arg. SameKind (Apply (Compare_0123456789876543210Sym1 l) arg) (Compare_0123456789876543210Sym2 l arg) =>+ Compare_0123456789876543210Sym1KindInference+ type instance Apply (Compare_0123456789876543210Sym1 l) l = Compare_0123456789876543210 l l+ instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Compare_0123456789876543210Sym0 where+ Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym0 (l :: TyFun Type (TyFun Type Ordering+ -> Type))+ = forall arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>+ Compare_0123456789876543210Sym0KindInference+ type instance Apply Compare_0123456789876543210Sym0 l = Compare_0123456789876543210Sym1 l+ instance POrd Type where+ type Compare (a :: Type) (a :: Type) = Apply (Apply Compare_0123456789876543210Sym0 a) a+ instance (SOrd Type, SOrd Nat) => SOrd Type where+ sCompare ::+ forall (t1 :: Type) (t2 :: Type).+ Sing t1+ -> Sing t2+ -> Sing (Apply (Apply (CompareSym0 :: TyFun Type (TyFun Type Ordering+ -> Type)+ -> Type) t1 :: TyFun Type Ordering+ -> Type) t2 :: Ordering)+ sCompare SNat SNat+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ SNil+ sCompare SInt SInt+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ SNil+ sCompare SString SString+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ SNil+ sCompare+ (SMaybe (sA_0123456789876543210 :: Sing a_0123456789876543210))+ (SMaybe (sB_0123456789876543210 :: Sing b_0123456789876543210))+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ SNil)+ sCompare+ (SVec (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210))+ (SVec (sB_0123456789876543210 :: Sing b_0123456789876543210)+ (sB_0123456789876543210 :: Sing b_0123456789876543210))+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing+ ((applySing ((singFun2 @CompareSym0) sCompare))+ sA_0123456789876543210))+ sB_0123456789876543210)))+ SNil))+ sCompare SNat SInt = SLT+ sCompare SNat SString = SLT+ sCompare SNat (SMaybe _) = SLT+ sCompare SNat (SVec _ _) = SLT+ sCompare SInt SNat = SGT+ sCompare SInt SString = SLT+ sCompare SInt (SMaybe _) = SLT+ sCompare SInt (SVec _ _) = SLT+ sCompare SString SNat = SGT+ sCompare SString SInt = SGT+ sCompare SString (SMaybe _) = SLT+ sCompare SString (SVec _ _) = SLT+ sCompare (SMaybe _) SNat = SGT+ sCompare (SMaybe _) SInt = SGT+ sCompare (SMaybe _) SString = SGT+ sCompare (SMaybe _) (SVec _ _) = SLT+ sCompare (SVec _ _) SNat = SGT+ sCompare (SVec _ _) SInt = SGT+ sCompare (SVec _ _) SString = SGT+ sCompare (SVec _ _) (SMaybe _) = SGT+ data instance Sing (z :: Type)+ = z ~ Nat => SNat |+ z ~ Int => SInt |+ z ~ String => SString |+ forall (n :: Type). z ~ Maybe n => SMaybe (Sing (n :: Type)) |+ forall (n :: Type) (n :: Nat). z ~ Vec n n =>+ SVec (Sing (n :: Type)) (Sing (n :: Nat))+ type SRep = (Sing :: Type -> Type)+ instance SingKind Type where+ type Demote Type = Rep+ fromSing SNat = Singletons.Star.Nat+ fromSing SInt = Singletons.Star.Int+ fromSing SString = Singletons.Star.String+ fromSing (SMaybe b) = Singletons.Star.Maybe (fromSing b)+ fromSing (SVec b b)+ = (Singletons.Star.Vec (fromSing b)) (fromSing b)+ toSing Singletons.Star.Nat = SomeSing SNat+ toSing Singletons.Star.Int = SomeSing SInt+ toSing Singletons.Star.String = SomeSing SString+ toSing (Singletons.Star.Maybe b)+ = case toSing b :: SomeSing Type of {+ SomeSing c -> SomeSing (SMaybe c) }+ toSing (Singletons.Star.Vec b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing Type))+ (toSing b :: SomeSing Nat)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing ((SVec c) c) }+ instance SEq Type where+ (%:==) SNat SNat = STrue+ (%:==) SNat SInt = SFalse+ (%:==) SNat SString = SFalse+ (%:==) SNat (SMaybe _) = SFalse+ (%:==) SNat (SVec _ _) = SFalse+ (%:==) SInt SNat = SFalse+ (%:==) SInt SInt = STrue+ (%:==) SInt SString = SFalse+ (%:==) SInt (SMaybe _) = SFalse+ (%:==) SInt (SVec _ _) = SFalse+ (%:==) SString SNat = SFalse+ (%:==) SString SInt = SFalse+ (%:==) SString SString = STrue+ (%:==) SString (SMaybe _) = SFalse+ (%:==) SString (SVec _ _) = SFalse+ (%:==) (SMaybe _) SNat = SFalse+ (%:==) (SMaybe _) SInt = SFalse+ (%:==) (SMaybe _) SString = SFalse+ (%:==) (SMaybe a) (SMaybe b) = ((%:==) a) b+ (%:==) (SMaybe _) (SVec _ _) = SFalse+ (%:==) (SVec _ _) SNat = SFalse+ (%:==) (SVec _ _) SInt = SFalse+ (%:==) (SVec _ _) SString = SFalse+ (%:==) (SVec _ _) (SMaybe _) = SFalse+ (%:==) (SVec a a) (SVec b b)+ = ((%:&&) (((%:==) a) b)) (((%:==) a) b)+ instance SDecide Type where+ (%~) SNat SNat = Proved Refl+ (%~) SNat SInt+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SNat SString+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SNat (SMaybe _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SNat (SVec _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SInt SNat+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SInt SInt = Proved Refl+ (%~) SInt SString+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SInt (SMaybe _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SInt (SVec _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SString SNat+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SString SInt+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SString SString = Proved Refl+ (%~) SString (SMaybe _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SString (SVec _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SMaybe _) SNat+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SMaybe _) SInt+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SMaybe _) SString+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SMaybe a) (SMaybe b)+ = case ((%~) a) b of+ Proved Refl -> Proved Refl+ Disproved contra+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ (%~) (SMaybe _) (SVec _ _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SVec _ _) SNat+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SVec _ _) SInt+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SVec _ _) SString+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SVec _ _) (SMaybe _)+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) (SVec a a) (SVec b b)+ = case (GHC.Tuple.(,) (((%~) a) b)) (((%~) a) b) of+ GHC.Tuple.(,) (Proved Refl) (Proved Refl) -> Proved Refl+ GHC.Tuple.(,) (Disproved contra) _+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ GHC.Tuple.(,) _ (Disproved contra)+ -> Disproved (\ refl -> case refl of { Refl -> contra Refl })+ instance SingI Nat where+ sing = SNat+ instance SingI Int where+ sing = SInt+ instance SingI String where+ sing = SString+ instance SingI n => SingI (Maybe (n :: Type)) where+ sing = SMaybe sing+ instance (SingI n, SingI n) =>+ SingI (Vec (n :: Type) (n :: Nat)) where+ sing = (SVec sing) sing
− tests/compile-and-dump/Singletons/T124.ghc80.template
@@ -1,37 +0,0 @@-Singletons/T124.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| foo :: Bool -> ()- foo True = ()- foo False = () |]- ======>- foo :: Bool -> ()- foo True = GHC.Tuple.()- foo False = GHC.Tuple.()- type FooSym1 (t :: Bool) = Foo t- instance SuppressUnusedWarnings FooSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym0KindInference GHC.Tuple.())- data FooSym0 (l :: TyFun Bool ())- = forall arg. KindOf (Apply FooSym0 arg) ~ KindOf (FooSym1 arg) =>- FooSym0KindInference- type instance Apply FooSym0 l = FooSym1 l- type family Foo (a :: Bool) :: () where- Foo True = Tuple0Sym0- Foo False = Tuple0Sym0- sFoo :: forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: ())- sFoo STrue- = let- lambda :: t ~ TrueSym0 => Sing (Apply FooSym0 t :: ())- lambda = STuple0- in lambda- sFoo SFalse- = let- lambda :: t ~ FalseSym0 => Sing (Apply FooSym0 t :: ())- lambda = STuple0- in lambda-Singletons/T124.hs:0:0:: Splicing expression- sCases ''Bool [| b |] [| STuple0 |]- ======>- case b of {- SFalse -> STuple0- STrue -> STuple0 }
+ tests/compile-and-dump/Singletons/T124.ghc82.template view
@@ -0,0 +1,29 @@+Singletons/T124.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| foo :: Bool -> ()+ foo True = ()+ foo False = () |]+ ======>+ foo :: Bool -> ()+ foo True = GHC.Tuple.()+ foo False = GHC.Tuple.()+ type FooSym1 (t :: Bool) = Foo t+ instance SuppressUnusedWarnings FooSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym0KindInference) GHC.Tuple.())+ data FooSym0 (l :: TyFun Bool ())+ = forall arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>+ FooSym0KindInference+ type instance Apply FooSym0 l = Foo l+ type family Foo (a :: Bool) :: () where+ Foo True = Tuple0Sym0+ Foo False = Tuple0Sym0+ sFoo :: forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: ())+ sFoo STrue = STuple0+ sFoo SFalse = STuple0+Singletons/T124.hs:0:0:: Splicing expression+ sCases ''Bool [| b |] [| STuple0 |]+ ======>+ case b of+ SFalse -> STuple0+ STrue -> STuple0
− tests/compile-and-dump/Singletons/T136.ghc80.template
@@ -1,271 +0,0 @@-Singletons/T136.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| instance Enum BiNat where- succ [] = [True]- succ (False : as) = True : as- succ (True : as) = False : succ as- pred [] = error "pred 0"- pred (False : as) = True : pred as- pred (True : as) = False : as- toEnum i- | i < 0 = error "negative toEnum"- | i == 0 = []- | otherwise = succ (toEnum (pred i))- fromEnum [] = 0- fromEnum (False : as) = 2 * fromEnum as- fromEnum (True : as) = 1 + 2 * fromEnum as |]- ======>- instance Enum BiNat where- succ GHC.Types.[] = [True]- succ (False GHC.Types.: as) = (True GHC.Types.: as)- succ (True GHC.Types.: as) = (False GHC.Types.: (succ as))- pred GHC.Types.[] = error "pred 0"- pred (False GHC.Types.: as) = (True GHC.Types.: (pred as))- pred (True GHC.Types.: as) = (False GHC.Types.: as)- toEnum i- | (i < 0) = error "negative toEnum"- | (i == 0) = []- | otherwise = succ (toEnum (pred i))- fromEnum GHC.Types.[] = 0- fromEnum (False GHC.Types.: as) = (2 * (fromEnum as))- fromEnum (True GHC.Types.: as) = (1 + (2 * (fromEnum as)))- type family Succ_0123456789 (a :: [Bool]) :: [Bool] where- Succ_0123456789 '[] = Apply (Apply (:$) TrueSym0) '[]- Succ_0123456789 ((:) False as) = Apply (Apply (:$) TrueSym0) as- Succ_0123456789 ((:) True as) = Apply (Apply (:$) FalseSym0) (Apply SuccSym0 as)- type Succ_0123456789Sym1 (t :: [Bool]) = Succ_0123456789 t- instance SuppressUnusedWarnings Succ_0123456789Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Succ_0123456789Sym0KindInference GHC.Tuple.())- data Succ_0123456789Sym0 (l :: TyFun [Bool] [Bool])- = forall arg. KindOf (Apply Succ_0123456789Sym0 arg) ~ KindOf (Succ_0123456789Sym1 arg) =>- Succ_0123456789Sym0KindInference- type instance Apply Succ_0123456789Sym0 l = Succ_0123456789Sym1 l- type family Pred_0123456789 (a :: [Bool]) :: [Bool] where- Pred_0123456789 '[] = Apply ErrorSym0 "pred 0"- Pred_0123456789 ((:) False as) = Apply (Apply (:$) TrueSym0) (Apply PredSym0 as)- Pred_0123456789 ((:) True as) = Apply (Apply (:$) FalseSym0) as- type Pred_0123456789Sym1 (t :: [Bool]) = Pred_0123456789 t- instance SuppressUnusedWarnings Pred_0123456789Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Pred_0123456789Sym0KindInference GHC.Tuple.())- data Pred_0123456789Sym0 (l :: TyFun [Bool] [Bool])- = forall arg. KindOf (Apply Pred_0123456789Sym0 arg) ~ KindOf (Pred_0123456789Sym1 arg) =>- Pred_0123456789Sym0KindInference- type instance Apply Pred_0123456789Sym0 l = Pred_0123456789Sym1 l- type family Case_0123456789 i arg_0123456789 t where- Case_0123456789 i arg_0123456789 True = '[]- Case_0123456789 i arg_0123456789 False = Apply SuccSym0 (Apply ToEnumSym0 (Apply PredSym0 i))- type family Case_0123456789 i arg_0123456789 t where- Case_0123456789 i arg_0123456789 True = Apply ErrorSym0 "negative toEnum"- Case_0123456789 i arg_0123456789 False = Case_0123456789 i arg_0123456789 (Apply (Apply (:==$) i) (FromInteger 0))- type family Case_0123456789 arg_0123456789 t where- Case_0123456789 arg_0123456789 i = Case_0123456789 i arg_0123456789 (Apply (Apply (:<$) i) (FromInteger 0))- type family ToEnum_0123456789 (a :: GHC.Types.Nat) :: [Bool] where- ToEnum_0123456789 arg_0123456789 = Case_0123456789 arg_0123456789 arg_0123456789- type ToEnum_0123456789Sym1 (t :: GHC.Types.Nat) =- ToEnum_0123456789 t- instance SuppressUnusedWarnings ToEnum_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) ToEnum_0123456789Sym0KindInference GHC.Tuple.())- data ToEnum_0123456789Sym0 (l :: TyFun GHC.Types.Nat [Bool])- = forall arg. KindOf (Apply ToEnum_0123456789Sym0 arg) ~ KindOf (ToEnum_0123456789Sym1 arg) =>- ToEnum_0123456789Sym0KindInference- type instance Apply ToEnum_0123456789Sym0 l = ToEnum_0123456789Sym1 l- type family FromEnum_0123456789 (a :: [Bool]) :: GHC.Types.Nat where- FromEnum_0123456789 '[] = FromInteger 0- FromEnum_0123456789 ((:) False as) = Apply (Apply (:*$) (FromInteger 2)) (Apply FromEnumSym0 as)- FromEnum_0123456789 ((:) True as) = Apply (Apply (:+$) (FromInteger 1)) (Apply (Apply (:*$) (FromInteger 2)) (Apply FromEnumSym0 as))- type FromEnum_0123456789Sym1 (t :: [Bool]) = FromEnum_0123456789 t- instance SuppressUnusedWarnings FromEnum_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,) FromEnum_0123456789Sym0KindInference GHC.Tuple.())- data FromEnum_0123456789Sym0 (l :: TyFun [Bool] GHC.Types.Nat)- = forall arg. KindOf (Apply FromEnum_0123456789Sym0 arg) ~ KindOf (FromEnum_0123456789Sym1 arg) =>- FromEnum_0123456789Sym0KindInference- type instance Apply FromEnum_0123456789Sym0 l = FromEnum_0123456789Sym1 l- instance PEnum (Proxy :: Proxy [Bool]) where- type Succ (a :: [Bool]) = Apply Succ_0123456789Sym0 a- type Pred (a :: [Bool]) = Apply Pred_0123456789Sym0 a- type ToEnum (a :: GHC.Types.Nat) = Apply ToEnum_0123456789Sym0 a- type FromEnum (a :: [Bool]) = Apply FromEnum_0123456789Sym0 a- instance SEnum [Bool] where- sSucc ::- forall (t0 :: [Bool]).- Sing t0- -> Sing (Apply (SuccSym0 :: TyFun [Bool] [Bool]- -> GHC.Types.Type) t0 :: [Bool])- sPred ::- forall (t0 :: [Bool]).- Sing t0- -> Sing (Apply (PredSym0 :: TyFun [Bool] [Bool]- -> GHC.Types.Type) t0 :: [Bool])- sToEnum ::- forall (t0 :: GHC.Types.Nat).- Sing t0- -> Sing (Apply (ToEnumSym0 :: TyFun GHC.Types.Nat [Bool]- -> GHC.Types.Type) t0 :: [Bool])- sFromEnum ::- forall (t0 :: [Bool]).- Sing t0- -> Sing (Apply (FromEnumSym0 :: TyFun [Bool] GHC.Types.Nat- -> GHC.Types.Type) t0 :: GHC.Types.Nat)- sSucc SNil- = let- lambda :: t0 ~ '[] => Sing (Apply SuccSym0 t0 :: [Bool])- lambda- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) STrue) SNil- in lambda- sSucc (SCons SFalse sAs)- = let- lambda ::- forall as.- t0 ~ Apply (Apply (:$) FalseSym0) as =>- Sing as -> Sing (Apply SuccSym0 t0 :: [Bool])- lambda as- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) STrue) as- in lambda sAs- sSucc (SCons STrue sAs)- = let- lambda ::- forall as.- t0 ~ Apply (Apply (:$) TrueSym0) as =>- Sing as -> Sing (Apply SuccSym0 t0 :: [Bool])- lambda as- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SFalse)- (applySing (singFun1 (Proxy :: Proxy SuccSym0) sSucc) as)- in lambda sAs- sPred SNil- = let- lambda :: t0 ~ '[] => Sing (Apply PredSym0 t0 :: [Bool])- lambda = sError (sing :: Sing "pred 0")- in lambda- sPred (SCons SFalse sAs)- = let- lambda ::- forall as.- t0 ~ Apply (Apply (:$) FalseSym0) as =>- Sing as -> Sing (Apply PredSym0 t0 :: [Bool])- lambda as- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) STrue)- (applySing (singFun1 (Proxy :: Proxy PredSym0) sPred) as)- in lambda sAs- sPred (SCons STrue sAs)- = let- lambda ::- forall as.- t0 ~ Apply (Apply (:$) TrueSym0) as =>- Sing as -> Sing (Apply PredSym0 t0 :: [Bool])- lambda as- = applySing- (applySing (singFun2 (Proxy :: Proxy (:$)) SCons) SFalse) as- in lambda sAs- sToEnum sArg_0123456789- = let- lambda ::- forall arg_0123456789.- t0 ~ arg_0123456789 =>- Sing arg_0123456789 -> Sing (Apply ToEnumSym0 t0 :: [Bool])- lambda arg_0123456789- = case arg_0123456789 of {- sI- -> let- lambda ::- forall i.- i ~ arg_0123456789 =>- Sing i -> Sing (Case_0123456789 arg_0123456789 i :: [Bool])- lambda i- = case- applySing- (applySing (singFun2 (Proxy :: Proxy (:<$)) (%:<)) i)- (sFromInteger (sing :: Sing 0))- of {- STrue- -> let- lambda ::- TrueSym0 ~ Apply (Apply (:<$) i) (FromInteger 0) =>- Sing (Case_0123456789 i arg_0123456789 TrueSym0 :: [Bool])- lambda = sError (sing :: Sing "negative toEnum")- in lambda- SFalse- -> let- lambda ::- FalseSym0 ~ Apply (Apply (:<$) i) (FromInteger 0) =>- Sing (Case_0123456789 i arg_0123456789 FalseSym0 :: [Bool])- lambda- = case- applySing- (applySing- (singFun2 (Proxy :: Proxy (:==$)) (%:==)) i)- (sFromInteger (sing :: Sing 0))- of {- STrue- -> let- lambda ::- TrueSym0 ~ Apply (Apply (:==$) i) (FromInteger 0) =>- Sing (Case_0123456789 i arg_0123456789 TrueSym0 :: [Bool])- lambda = SNil- in lambda- SFalse- -> let- lambda ::- FalseSym0 ~ Apply (Apply (:==$) i) (FromInteger 0) =>- Sing (Case_0123456789 i arg_0123456789 FalseSym0 :: [Bool])- lambda- = applySing- (singFun1 (Proxy :: Proxy SuccSym0) sSucc)- (applySing- (singFun1- (Proxy :: Proxy ToEnumSym0) sToEnum)- (applySing- (singFun1- (Proxy :: Proxy PredSym0) sPred)- i))- in lambda } ::- Sing (Case_0123456789 i arg_0123456789 (Apply (Apply (:==$) i) (FromInteger 0)) :: [Bool])- in lambda } ::- Sing (Case_0123456789 i arg_0123456789 (Apply (Apply (:<$) i) (FromInteger 0)) :: [Bool])- in lambda sI } ::- Sing (Case_0123456789 arg_0123456789 arg_0123456789 :: [Bool])- in lambda sArg_0123456789- sFromEnum SNil- = let- lambda :: t0 ~ '[] => Sing (Apply FromEnumSym0 t0 :: GHC.Types.Nat)- lambda = sFromInteger (sing :: Sing 0)- in lambda- sFromEnum (SCons SFalse sAs)- = let- lambda ::- forall as.- t0 ~ Apply (Apply (:$) FalseSym0) as =>- Sing as -> Sing (Apply FromEnumSym0 t0 :: GHC.Types.Nat)- lambda as- = applySing- (applySing- (singFun2 (Proxy :: Proxy (:*$)) (%:*))- (sFromInteger (sing :: Sing 2)))- (applySing (singFun1 (Proxy :: Proxy FromEnumSym0) sFromEnum) as)- in lambda sAs- sFromEnum (SCons STrue sAs)- = let- lambda ::- forall as.- t0 ~ Apply (Apply (:$) TrueSym0) as =>- Sing as -> Sing (Apply FromEnumSym0 t0 :: GHC.Types.Nat)- lambda as- = applySing- (applySing- (singFun2 (Proxy :: Proxy (:+$)) (%:+))- (sFromInteger (sing :: Sing 1)))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:*$)) (%:*))- (sFromInteger (sing :: Sing 2)))- (applySing (singFun1 (Proxy :: Proxy FromEnumSym0) sFromEnum) as))- in lambda sAs
+ tests/compile-and-dump/Singletons/T136.ghc82.template view
@@ -0,0 +1,171 @@+Singletons/T136.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| instance Enum BiNat where+ succ [] = [True]+ succ (False : as) = True : as+ succ (True : as) = False : succ as+ pred [] = error "pred 0"+ pred (False : as) = True : pred as+ pred (True : as) = False : as+ toEnum i+ | i < 0 = error "negative toEnum"+ | i == 0 = []+ | otherwise = succ (toEnum (pred i))+ fromEnum [] = 0+ fromEnum (False : as) = 2 * fromEnum as+ fromEnum (True : as) = 1 + 2 * fromEnum as |]+ ======>+ instance Enum BiNat where+ succ GHC.Types.[] = [True]+ succ (False GHC.Types.: as) = (True GHC.Types.: as)+ succ (True GHC.Types.: as) = (False GHC.Types.: (succ as))+ pred GHC.Types.[] = error "pred 0"+ pred (False GHC.Types.: as) = (True GHC.Types.: (pred as))+ pred (True GHC.Types.: as) = (False GHC.Types.: as)+ toEnum i+ | (i < 0) = error "negative toEnum"+ | (i == 0) = []+ | otherwise = succ (toEnum (pred i))+ fromEnum GHC.Types.[] = 0+ fromEnum (False GHC.Types.: as) = (2 * (fromEnum as))+ fromEnum (True GHC.Types.: as) = (1 + (2 * (fromEnum as)))+ type family Succ_0123456789876543210 (a :: [Bool]) :: [Bool] where+ Succ_0123456789876543210 '[] = Apply (Apply (:$) TrueSym0) '[]+ Succ_0123456789876543210 ((:) False as) = Apply (Apply (:$) TrueSym0) as+ Succ_0123456789876543210 ((:) True as) = Apply (Apply (:$) FalseSym0) (Apply SuccSym0 as)+ type Succ_0123456789876543210Sym1 (t :: [Bool]) =+ Succ_0123456789876543210 t+ instance SuppressUnusedWarnings Succ_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Succ_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Succ_0123456789876543210Sym0 (l :: TyFun [Bool] [Bool])+ = forall arg. SameKind (Apply Succ_0123456789876543210Sym0 arg) (Succ_0123456789876543210Sym1 arg) =>+ Succ_0123456789876543210Sym0KindInference+ type instance Apply Succ_0123456789876543210Sym0 l = Succ_0123456789876543210 l+ type family Pred_0123456789876543210 (a :: [Bool]) :: [Bool] where+ Pred_0123456789876543210 '[] = Apply ErrorSym0 "pred 0"+ Pred_0123456789876543210 ((:) False as) = Apply (Apply (:$) TrueSym0) (Apply PredSym0 as)+ Pred_0123456789876543210 ((:) True as) = Apply (Apply (:$) FalseSym0) as+ type Pred_0123456789876543210Sym1 (t :: [Bool]) =+ Pred_0123456789876543210 t+ instance SuppressUnusedWarnings Pred_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Pred_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Pred_0123456789876543210Sym0 (l :: TyFun [Bool] [Bool])+ = forall arg. SameKind (Apply Pred_0123456789876543210Sym0 arg) (Pred_0123456789876543210Sym1 arg) =>+ Pred_0123456789876543210Sym0KindInference+ type instance Apply Pred_0123456789876543210Sym0 l = Pred_0123456789876543210 l+ type family Case_0123456789876543210 i arg_0123456789876543210 t where+ Case_0123456789876543210 i arg_0123456789876543210 True = '[]+ Case_0123456789876543210 i arg_0123456789876543210 False = Apply SuccSym0 (Apply ToEnumSym0 (Apply PredSym0 i))+ type family Case_0123456789876543210 i arg_0123456789876543210 t where+ Case_0123456789876543210 i arg_0123456789876543210 True = Apply ErrorSym0 "negative toEnum"+ Case_0123456789876543210 i arg_0123456789876543210 False = Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (:==$) i) (FromInteger 0))+ type family Case_0123456789876543210 arg_0123456789876543210 t where+ Case_0123456789876543210 arg_0123456789876543210 i = Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (:<$) i) (FromInteger 0))+ type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: [Bool] where+ ToEnum_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210+ type ToEnum_0123456789876543210Sym1 (t :: GHC.Types.Nat) =+ ToEnum_0123456789876543210 t+ instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) ToEnum_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data ToEnum_0123456789876543210Sym0 (l :: TyFun GHC.Types.Nat [Bool])+ = forall arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>+ ToEnum_0123456789876543210Sym0KindInference+ type instance Apply ToEnum_0123456789876543210Sym0 l = ToEnum_0123456789876543210 l+ type family FromEnum_0123456789876543210 (a :: [Bool]) :: GHC.Types.Nat where+ FromEnum_0123456789876543210 '[] = FromInteger 0+ FromEnum_0123456789876543210 ((:) False as) = Apply (Apply (:*$) (FromInteger 2)) (Apply FromEnumSym0 as)+ FromEnum_0123456789876543210 ((:) True as) = Apply (Apply (:+$) (FromInteger 1)) (Apply (Apply (:*$) (FromInteger 2)) (Apply FromEnumSym0 as))+ type FromEnum_0123456789876543210Sym1 (t :: [Bool]) =+ FromEnum_0123456789876543210 t+ instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) FromEnum_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data FromEnum_0123456789876543210Sym0 (l :: TyFun [Bool] GHC.Types.Nat)+ = forall arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>+ FromEnum_0123456789876543210Sym0KindInference+ type instance Apply FromEnum_0123456789876543210Sym0 l = FromEnum_0123456789876543210 l+ instance PEnum [Bool] where+ type Succ (a :: [Bool]) = Apply Succ_0123456789876543210Sym0 a+ type Pred (a :: [Bool]) = Apply Pred_0123456789876543210Sym0 a+ type ToEnum (a :: GHC.Types.Nat) = Apply ToEnum_0123456789876543210Sym0 a+ type FromEnum (a :: [Bool]) = Apply FromEnum_0123456789876543210Sym0 a+ instance SEnum [Bool] where+ sSucc ::+ forall (t :: [Bool]).+ Sing t+ -> Sing (Apply (SuccSym0 :: TyFun [Bool] [Bool]+ -> GHC.Types.Type) t :: [Bool])+ sPred ::+ forall (t :: [Bool]).+ Sing t+ -> Sing (Apply (PredSym0 :: TyFun [Bool] [Bool]+ -> GHC.Types.Type) t :: [Bool])+ sToEnum ::+ forall (t :: GHC.Types.Nat).+ Sing t+ -> Sing (Apply (ToEnumSym0 :: TyFun GHC.Types.Nat [Bool]+ -> GHC.Types.Type) t :: [Bool])+ sFromEnum ::+ forall (t :: [Bool]).+ Sing t+ -> Sing (Apply (FromEnumSym0 :: TyFun [Bool] GHC.Types.Nat+ -> GHC.Types.Type) t :: GHC.Types.Nat)+ sSucc SNil+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) STrue)) SNil+ sSucc (SCons SFalse (sAs :: Sing as))+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) STrue)) sAs+ sSucc (SCons STrue (sAs :: Sing as))+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) SFalse))+ ((applySing ((singFun1 @SuccSym0) sSucc)) sAs)+ sPred SNil = sError (sing :: Sing "pred 0")+ sPred (SCons SFalse (sAs :: Sing as))+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) STrue))+ ((applySing ((singFun1 @PredSym0) sPred)) sAs)+ sPred (SCons STrue (sAs :: Sing as))+ = (applySing ((applySing ((singFun2 @(:$)) SCons)) SFalse)) sAs+ sToEnum (sArg_0123456789876543210 :: Sing arg_0123456789876543210)+ = case sArg_0123456789876543210 of {+ sI :: Sing i+ -> case+ (applySing ((applySing ((singFun2 @(:<$)) (%:<))) sI))+ (sFromInteger (sing :: Sing 0))+ of+ STrue -> sError (sing :: Sing "negative toEnum")+ SFalse+ -> case+ (applySing ((applySing ((singFun2 @(:==$)) (%:==))) sI))+ (sFromInteger (sing :: Sing 0))+ of+ STrue -> SNil+ SFalse+ -> (applySing ((singFun1 @SuccSym0) sSucc))+ ((applySing ((singFun1 @ToEnumSym0) sToEnum))+ ((applySing ((singFun1 @PredSym0) sPred)) sI)) ::+ Sing (Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (:==$) i) (FromInteger 0)) :: [Bool]) ::+ Sing (Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (:<$) i) (FromInteger 0)) :: [Bool]) } ::+ Sing (Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210 :: [Bool])+ sFromEnum SNil = sFromInteger (sing :: Sing 0)+ sFromEnum (SCons SFalse (sAs :: Sing as))+ = (applySing+ ((applySing ((singFun2 @(:*$)) (%:*)))+ (sFromInteger (sing :: Sing 2))))+ ((applySing ((singFun1 @FromEnumSym0) sFromEnum)) sAs)+ sFromEnum (SCons STrue (sAs :: Sing as))+ = (applySing+ ((applySing ((singFun2 @(:+$)) (%:+)))+ (sFromInteger (sing :: Sing 1))))+ ((applySing+ ((applySing ((singFun2 @(:*$)) (%:*)))+ (sFromInteger (sing :: Sing 2))))+ ((applySing ((singFun1 @FromEnumSym0) sFromEnum)) sAs))
− tests/compile-and-dump/Singletons/T136b.ghc80.template
@@ -1,53 +0,0 @@-Singletons/T136b.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| class C a where- meth :: a -> a |]- ======>- class C a where- meth :: a -> a- type MethSym1 (t :: a0123456789) = Meth t- instance SuppressUnusedWarnings MethSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) MethSym0KindInference GHC.Tuple.())- data MethSym0 (l :: TyFun a0123456789 a0123456789)- = forall arg. KindOf (Apply MethSym0 arg) ~ KindOf (MethSym1 arg) =>- MethSym0KindInference- type instance Apply MethSym0 l = MethSym1 l- class kproxy ~ Proxy => PC (kproxy :: Proxy a) where- type Meth (arg :: a) :: a- class SC a where- sMeth :: forall (t :: a). Sing t -> Sing (Apply MethSym0 t :: a)-Singletons/T136b.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| instance C Bool where- meth = not |]- ======>- instance C Bool where- meth = not- type family Meth_0123456789 (a :: Bool) :: Bool where- Meth_0123456789 a_0123456789 = Apply NotSym0 a_0123456789- type Meth_0123456789Sym1 (t :: Bool) = Meth_0123456789 t- instance SuppressUnusedWarnings Meth_0123456789Sym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) Meth_0123456789Sym0KindInference GHC.Tuple.())- data Meth_0123456789Sym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply Meth_0123456789Sym0 arg) ~ KindOf (Meth_0123456789Sym1 arg) =>- Meth_0123456789Sym0KindInference- type instance Apply Meth_0123456789Sym0 l = Meth_0123456789Sym1 l- instance PC (Proxy :: Proxy Bool) where- type Meth (a :: Bool) = Apply Meth_0123456789Sym0 a- instance SC Bool where- sMeth ::- forall (t :: Bool).- Sing t- -> Sing (Apply (MethSym0 :: TyFun Bool Bool- -> GHC.Types.Type) t :: Bool)- sMeth sA_0123456789- = let- lambda ::- forall a_0123456789.- t ~ a_0123456789 =>- Sing a_0123456789 -> Sing (Apply MethSym0 t :: Bool)- lambda a_0123456789- = applySing (singFun1 (Proxy :: Proxy NotSym0) sNot) a_0123456789- in lambda sA_0123456789
+ tests/compile-and-dump/Singletons/T136b.ghc82.template view
@@ -0,0 +1,49 @@+Singletons/T136b.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| class C a where+ meth :: a -> a |]+ ======>+ class C a where+ meth :: a -> a+ type MethSym1 (t :: a0123456789876543210) = Meth t+ instance SuppressUnusedWarnings MethSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) MethSym0KindInference) GHC.Tuple.())+ data MethSym0 (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply MethSym0 arg) (MethSym1 arg) =>+ MethSym0KindInference+ type instance Apply MethSym0 l = Meth l+ class PC (a :: GHC.Types.Type) where+ type Meth (arg :: a) :: a+ class SC a where+ sMeth :: forall (t :: a). Sing t -> Sing (Apply MethSym0 t :: a)+Singletons/T136b.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| instance C Bool where+ meth = not |]+ ======>+ instance C Bool where+ meth = not+ type family Meth_0123456789876543210 (a :: Bool) :: Bool where+ Meth_0123456789876543210 a_0123456789876543210 = Apply NotSym0 a_0123456789876543210+ type Meth_0123456789876543210Sym1 (t :: Bool) =+ Meth_0123456789876543210 t+ instance SuppressUnusedWarnings Meth_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Meth_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Meth_0123456789876543210Sym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply Meth_0123456789876543210Sym0 arg) (Meth_0123456789876543210Sym1 arg) =>+ Meth_0123456789876543210Sym0KindInference+ type instance Apply Meth_0123456789876543210Sym0 l = Meth_0123456789876543210 l+ instance PC Bool where+ type Meth (a :: Bool) = Apply Meth_0123456789876543210Sym0 a+ instance SC Bool where+ sMeth ::+ forall (t :: Bool).+ Sing t+ -> Sing (Apply (MethSym0 :: TyFun Bool Bool+ -> GHC.Types.Type) t :: Bool)+ sMeth (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing ((singFun1 @NotSym0) sNot)) sA_0123456789876543210
+ tests/compile-and-dump/Singletons/T145.ghc82.template view
@@ -0,0 +1,30 @@+Singletons/T145.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| class Column (f :: Type -> Type) where+ col :: f a -> a -> Bool |]+ ======>+ class Column (f :: Type -> Type) where+ col :: f a -> a -> Bool+ type ColSym2 (t :: f0123456789876543210 a0123456789876543210) (t :: a0123456789876543210) =+ Col t t+ instance SuppressUnusedWarnings ColSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ColSym1KindInference) GHC.Tuple.())+ data ColSym1 (l :: f0123456789876543210 a0123456789876543210) (l :: TyFun a0123456789876543210 Bool)+ = forall arg. SameKind (Apply (ColSym1 l) arg) (ColSym2 l arg) =>+ ColSym1KindInference+ type instance Apply (ColSym1 l) l = Col l l+ instance SuppressUnusedWarnings ColSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) ColSym0KindInference) GHC.Tuple.())+ data ColSym0 (l :: TyFun (f0123456789876543210 a0123456789876543210) (TyFun a0123456789876543210 Bool+ -> Type))+ = forall arg. SameKind (Apply ColSym0 arg) (ColSym1 arg) =>+ ColSym0KindInference+ type instance Apply ColSym0 l = ColSym1 l+ class PColumn (f :: Type -> Type) where+ type Col (arg :: f a) (arg :: a) :: Bool+ class SColumn (f :: Type -> Type) where+ sCol ::+ forall (t :: f a) (t :: a).+ Sing t -> Sing t -> Sing (Apply (Apply ColSym0 t) t :: Bool)
+ tests/compile-and-dump/Singletons/T145.hs view
@@ -0,0 +1,9 @@+module Singletons.T145 where++import Data.Singletons.TH+import Data.Kind++$(singletons [d|+ class Column (f :: Type -> Type) where+ col :: f a -> a -> Bool+ |])
+ tests/compile-and-dump/Singletons/T153.ghc82.template view
+ tests/compile-and-dump/Singletons/T153.hs view
@@ -0,0 +1,13 @@+{-# LANGUAGE LambdaCase, GADTs, ScopedTypeVariables, TypeInType,+ TypeApplications, RankNTypes #-}++module Singletons.T153 where++import Data.Singletons+import Data.Singletons.Prelude++foo :: Int+foo = withSomeSing @(Maybe Bool) (Just True) $ \case+ SJust STrue -> 0+ SJust SFalse -> 1+ SNothing -> 2
+ tests/compile-and-dump/Singletons/T157.ghc82.template view
+ tests/compile-and-dump/Singletons/T157.hs view
@@ -0,0 +1,6 @@+module T157 where++import Data.Singletons.Prelude++foo :: SList '["a", "b", "c"]+foo = sing `SCons` sing `SCons` sing
+ tests/compile-and-dump/Singletons/T159.ghc82.template view
@@ -0,0 +1,181 @@+Singletons/T159.hs:0:0:: Splicing declarations+ genSingletons [''T0, ''T1]+ ======>+ type ASym0 = A+ type BSym0 = B+ type CSym0 = C+ type DSym0 = D+ type ESym0 = E+ type FSym0 = F+ data instance Sing (z :: T0)+ = z ~ A => SA |+ z ~ B => SB |+ z ~ C => SC |+ z ~ D => SD |+ z ~ E => SE |+ z ~ F => SF+ type ST0 = (Sing :: T0 -> GHC.Types.Type)+ instance SingKind T0 where+ type Demote T0 = T0+ fromSing SA = A+ fromSing SB = B+ fromSing SC = C+ fromSing SD = D+ fromSing SE = E+ fromSing SF = F+ toSing A = SomeSing SA+ toSing B = SomeSing SB+ toSing C = SomeSing SC+ toSing D = SomeSing SD+ toSing E = SomeSing SE+ toSing F = SomeSing SF+ instance SingI A where+ sing = SA+ instance SingI B where+ sing = SB+ instance SingI C where+ sing = SC+ instance SingI D where+ sing = SD+ instance SingI E where+ sing = SE+ instance SingI F where+ sing = SF+ type N1Sym0 = N1+ type C1Sym2 (t :: T0) (t :: T1) = C1 t t+ instance SuppressUnusedWarnings C1Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) C1Sym1KindInference) GHC.Tuple.())+ data C1Sym1 (l :: T0) (l :: TyFun T1 T1)+ = forall arg. SameKind (Apply (C1Sym1 l) arg) (C1Sym2 l arg) =>+ C1Sym1KindInference+ type instance Apply (C1Sym1 l) l = C1 l l+ instance SuppressUnusedWarnings C1Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) C1Sym0KindInference) GHC.Tuple.())+ data C1Sym0 (l :: TyFun T0 (TyFun T1 T1 -> GHC.Types.Type))+ = forall arg. SameKind (Apply C1Sym0 arg) (C1Sym1 arg) =>+ C1Sym0KindInference+ type instance Apply C1Sym0 l = C1Sym1 l+ type (:&&$$$) (t :: T0) (t :: T1) = (:&&) t t+ instance SuppressUnusedWarnings (:&&$$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:&&$$###)) GHC.Tuple.())+ data (:&&$$) (l :: T0) (l :: TyFun T1 T1)+ = forall arg. SameKind (Apply ((:&&$$) l) arg) ((:&&$$$) l arg) =>+ (:&&$$###)+ type instance Apply ((:&&$$) l) l = (:&&) l l+ instance SuppressUnusedWarnings (:&&$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:&&$###)) GHC.Tuple.())+ data (:&&$) (l :: TyFun T0 (TyFun T1 T1 -> GHC.Types.Type))+ = forall arg. SameKind (Apply (:&&$) arg) ((:&&$$) arg) =>+ (:&&$###)+ type instance Apply (:&&$) l = (:&&$$) l+ data instance Sing (z :: T1)+ = z ~ N1 => SN1 |+ forall (n :: T0) (n :: T1). z ~ C1 n n =>+ SC1 (Sing (n :: T0)) (Sing (n :: T1)) |+ forall (n :: T0) (n :: T1). z ~ (:&&) n n =>+ (:%&&) (Sing (n :: T0)) (Sing (n :: T1))+ type ST1 = (Sing :: T1 -> GHC.Types.Type)+ instance SingKind T1 where+ type Demote T1 = T1+ fromSing SN1 = N1+ fromSing (SC1 b b) = (C1 (fromSing b)) (fromSing b)+ fromSing ((:%&&) b b) = ((:&&) (fromSing b)) (fromSing b)+ toSing N1 = SomeSing SN1+ toSing (C1 b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing T0)) (toSing b :: SomeSing T1)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing ((SC1 c) c) }+ toSing ((:&&) b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing T0)) (toSing b :: SomeSing T1)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c)+ -> SomeSing (((:%&&) c) c) }+ infixr 5 `SC1`+ infixr 5 :%&&+ instance SingI N1 where+ sing = SN1+ instance (SingI n, SingI n) => SingI (C1 (n :: T0) (n :: T1)) where+ sing = (SC1 sing) sing+ instance (SingI n, SingI n) =>+ SingI ((:&&) (n :: T0) (n :: T1)) where+ sing = ((:%&&) sing) sing+Singletons/T159.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| infixr 5 :||+ infixr 5 `C2`+ + data T2 = N2 | C2 T0 T2 | T0 :|| T2 |]+ ======>+ data T2 = N2 | C2 T0 T2 | T0 :|| T2+ infixr 5 `C2`+ infixr 5 :||+ type N2Sym0 = N2+ type C2Sym2 (t :: T0) (t :: T2) = C2 t t+ instance SuppressUnusedWarnings C2Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) C2Sym1KindInference) GHC.Tuple.())+ data C2Sym1 (l :: T0) (l :: TyFun T2 T2)+ = forall arg. SameKind (Apply (C2Sym1 l) arg) (C2Sym2 l arg) =>+ C2Sym1KindInference+ type instance Apply (C2Sym1 l) l = C2 l l+ instance SuppressUnusedWarnings C2Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) C2Sym0KindInference) GHC.Tuple.())+ data C2Sym0 (l :: TyFun T0 (TyFun T2 T2 -> GHC.Types.Type))+ = forall arg. SameKind (Apply C2Sym0 arg) (C2Sym1 arg) =>+ C2Sym0KindInference+ type instance Apply C2Sym0 l = C2Sym1 l+ type (:||$$$) (t :: T0) (t :: T2) = (:||) t t+ instance SuppressUnusedWarnings (:||$$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:||$$###)) GHC.Tuple.())+ data (:||$$) (l :: T0) (l :: TyFun T2 T2)+ = forall arg. SameKind (Apply ((:||$$) l) arg) ((:||$$$) l arg) =>+ (:||$$###)+ type instance Apply ((:||$$) l) l = (:||) l l+ instance SuppressUnusedWarnings (:||$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:||$###)) GHC.Tuple.())+ data (:||$) (l :: TyFun T0 (TyFun T2 T2 -> GHC.Types.Type))+ = forall arg. SameKind (Apply (:||$) arg) ((:||$$) arg) =>+ (:||$###)+ type instance Apply (:||$) l = (:||$$) l+ infixr 5 :%||+ infixr 5 `SC2`+ data instance Sing (z :: T2)+ = z ~ N2 => SN2 |+ forall (n :: T0) (n :: T2). z ~ C2 n n =>+ SC2 (Sing (n :: T0)) (Sing (n :: T2)) |+ forall (n :: T0) (n :: T2). z ~ (:||) n n =>+ (:%||) (Sing (n :: T0)) (Sing (n :: T2))+ type ST2 = (Sing :: T2 -> GHC.Types.Type)+ instance SingKind T2 where+ type Demote T2 = T2+ fromSing SN2 = N2+ fromSing (SC2 b b) = (C2 (fromSing b)) (fromSing b)+ fromSing ((:%||) b b) = ((:||) (fromSing b)) (fromSing b)+ toSing N2 = SomeSing SN2+ toSing (C2 b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing T0)) (toSing b :: SomeSing T2)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing ((SC2 c) c) }+ toSing ((:||) b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing T0)) (toSing b :: SomeSing T2)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c)+ -> SomeSing (((:%||) c) c) }+ instance SingI N2 where+ sing = SN2+ instance (SingI n, SingI n) => SingI (C2 (n :: T0) (n :: T2)) where+ sing = (SC2 sing) sing+ instance (SingI n, SingI n) =>+ SingI ((:||) (n :: T0) (n :: T2)) where+ sing = ((:%||) sing) sing
+ tests/compile-and-dump/Singletons/T159.hs view
@@ -0,0 +1,27 @@+module T159 where++import Data.Singletons.TH++data T0 = A | B | C | D | E | F+ deriving (Show)++data T1 = N1 | C1 T0 T1 | T0 :&& T1+ deriving (Show)++infixr 5 `C1`+infixr 5 :&&++genSingletons [''T0, ''T1]++singletons [d|+ data T2 = N2 | C2 T0 T2 | T0 :|| T2++ infixr 5 `C2`+ infixr 5 :||+ |]++t1 :: T1+t1 = fromSing $ SA `SC1` SB `SC1` SD :%&& SE :%&& SF `SC1` SN1++t2 :: T2+t2 = fromSing $ SA `SC2` SB `SC2` SD :%|| SE :%|| SF `SC2` SN2
+ tests/compile-and-dump/Singletons/T166.ghc82.template view
@@ -0,0 +1,11 @@++Singletons/T166.hs:0:0: error:+ Function being promoted to FooSym0 has too many arguments.+ |+14 | $(singletonsOnly [d|+ | ^^^^^^^^^^^^^^^^^^...++Singletons/T166.hs:0:0: error: Q monad failure+ |+14 | $(singletonsOnly [d|+ | ^^^^^^^^^^^^^^^^^^...
+ tests/compile-and-dump/Singletons/T166.hs view
@@ -0,0 +1,20 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DefaultSignatures #-}+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE KindSignatures #-}+{-# LANGUAGE PolyKinds #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TypeFamilies #-}+module SingletonsBug where++import Data.Singletons.TH+import GHC.TypeLits++$(singletonsOnly [d|+ class Foo a where+ foosPrec :: Nat -> a -> [Bool] -> [Bool]+ foo :: a -> [Bool]++ foo x s = foosPrec 0 x s+ |])
+ tests/compile-and-dump/Singletons/T167.ghc82.template view
@@ -0,0 +1,149 @@+Singletons/T167.hs:(0,0)-(0,0): Splicing declarations+ singletonsOnly+ [d| class Foo a where+ foosPrec :: Nat -> a -> DiffList+ fooList :: a -> DiffList+ fooList = undefined+ + instance Foo a => Foo [a] where+ foosPrec _ = fooList |]+ ======>+ type FoosPrecSym3 (t :: Nat) (t :: a0123456789876543210) (t :: [Bool]) =+ FoosPrec t t t+ instance SuppressUnusedWarnings FoosPrecSym2 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FoosPrecSym2KindInference) GHC.Tuple.())+ data FoosPrecSym2 (l :: Nat) (l :: a0123456789876543210) (l :: TyFun [Bool] [Bool])+ = forall arg. SameKind (Apply (FoosPrecSym2 l l) arg) (FoosPrecSym3 l l arg) =>+ FoosPrecSym2KindInference+ type instance Apply (FoosPrecSym2 l l) l = FoosPrec l l l+ instance SuppressUnusedWarnings FoosPrecSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FoosPrecSym1KindInference) GHC.Tuple.())+ data FoosPrecSym1 (l :: Nat) (l :: TyFun a0123456789876543210 (TyFun [Bool] [Bool]+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (FoosPrecSym1 l) arg) (FoosPrecSym2 l arg) =>+ FoosPrecSym1KindInference+ type instance Apply (FoosPrecSym1 l) l = FoosPrecSym2 l l+ instance SuppressUnusedWarnings FoosPrecSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FoosPrecSym0KindInference) GHC.Tuple.())+ data FoosPrecSym0 (l :: TyFun Nat (TyFun a0123456789876543210 (TyFun [Bool] [Bool]+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply FoosPrecSym0 arg) (FoosPrecSym1 arg) =>+ FoosPrecSym0KindInference+ type instance Apply FoosPrecSym0 l = FoosPrecSym1 l+ type FooListSym2 (t :: a0123456789876543210) (t :: [Bool]) =+ FooList t t+ instance SuppressUnusedWarnings FooListSym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooListSym1KindInference) GHC.Tuple.())+ data FooListSym1 (l :: a0123456789876543210) (l :: TyFun [Bool] [Bool])+ = forall arg. SameKind (Apply (FooListSym1 l) arg) (FooListSym2 l arg) =>+ FooListSym1KindInference+ type instance Apply (FooListSym1 l) l = FooList l l+ instance SuppressUnusedWarnings FooListSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooListSym0KindInference) GHC.Tuple.())+ data FooListSym0 (l :: TyFun a0123456789876543210 (TyFun [Bool] [Bool]+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply FooListSym0 arg) (FooListSym1 arg) =>+ FooListSym0KindInference+ type instance Apply FooListSym0 l = FooListSym1 l+ type family FooList_0123456789876543210 (a :: a) (a :: [Bool]) :: [Bool] where+ FooList_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply Any a_0123456789876543210) a_0123456789876543210+ type FooList_0123456789876543210Sym2 (t :: a0123456789876543210) (t :: [Bool]) =+ FooList_0123456789876543210 t t+ instance SuppressUnusedWarnings FooList_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) FooList_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data FooList_0123456789876543210Sym1 (l :: a0123456789876543210) (l :: TyFun [Bool] [Bool])+ = forall arg. SameKind (Apply (FooList_0123456789876543210Sym1 l) arg) (FooList_0123456789876543210Sym2 l arg) =>+ FooList_0123456789876543210Sym1KindInference+ type instance Apply (FooList_0123456789876543210Sym1 l) l = FooList_0123456789876543210 l l+ instance SuppressUnusedWarnings FooList_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) FooList_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data FooList_0123456789876543210Sym0 (l :: TyFun a0123456789876543210 (TyFun [Bool] [Bool]+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply FooList_0123456789876543210Sym0 arg) (FooList_0123456789876543210Sym1 arg) =>+ FooList_0123456789876543210Sym0KindInference+ type instance Apply FooList_0123456789876543210Sym0 l = FooList_0123456789876543210Sym1 l+ class PFoo (a :: GHC.Types.Type) where+ type FoosPrec (arg :: Nat) (arg :: a) (arg :: [Bool]) :: [Bool]+ type FooList (arg :: a) (arg :: [Bool]) :: [Bool]+ type FooList a a = Apply (Apply FooList_0123456789876543210Sym0 a) a+ type family FoosPrec_0123456789876543210 (a :: Nat) (a :: [a]) (a :: [Bool]) :: [Bool] where+ FoosPrec_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply FooListSym0 a_0123456789876543210) a_0123456789876543210+ type FoosPrec_0123456789876543210Sym3 (t :: Nat) (t :: [a0123456789876543210]) (t :: [Bool]) =+ FoosPrec_0123456789876543210 t t t+ instance SuppressUnusedWarnings FoosPrec_0123456789876543210Sym2 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) FoosPrec_0123456789876543210Sym2KindInference)+ GHC.Tuple.())+ data FoosPrec_0123456789876543210Sym2 (l :: Nat) (l :: [a0123456789876543210]) (l :: TyFun [Bool] [Bool])+ = forall arg. SameKind (Apply (FoosPrec_0123456789876543210Sym2 l l) arg) (FoosPrec_0123456789876543210Sym3 l l arg) =>+ FoosPrec_0123456789876543210Sym2KindInference+ type instance Apply (FoosPrec_0123456789876543210Sym2 l l) l = FoosPrec_0123456789876543210 l l l+ instance SuppressUnusedWarnings FoosPrec_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) FoosPrec_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data FoosPrec_0123456789876543210Sym1 (l :: Nat) (l :: TyFun [a0123456789876543210] (TyFun [Bool] [Bool]+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply (FoosPrec_0123456789876543210Sym1 l) arg) (FoosPrec_0123456789876543210Sym2 l arg) =>+ FoosPrec_0123456789876543210Sym1KindInference+ type instance Apply (FoosPrec_0123456789876543210Sym1 l) l = FoosPrec_0123456789876543210Sym2 l l+ instance SuppressUnusedWarnings FoosPrec_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) FoosPrec_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data FoosPrec_0123456789876543210Sym0 (l :: TyFun Nat (TyFun [a0123456789876543210] (TyFun [Bool] [Bool]+ -> GHC.Types.Type)+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply FoosPrec_0123456789876543210Sym0 arg) (FoosPrec_0123456789876543210Sym1 arg) =>+ FoosPrec_0123456789876543210Sym0KindInference+ type instance Apply FoosPrec_0123456789876543210Sym0 l = FoosPrec_0123456789876543210Sym1 l+ instance PFoo [a] where+ type FoosPrec (a :: Nat) (a :: [a]) (a :: [Bool]) = Apply (Apply (Apply FoosPrec_0123456789876543210Sym0 a) a) a+ class SFoo a where+ sFoosPrec ::+ forall (t :: Nat) (t :: a) (t :: [Bool]).+ Sing t+ -> Sing t+ -> Sing t+ -> Sing (Apply (Apply (Apply FoosPrecSym0 t) t) t :: [Bool])+ sFooList ::+ forall (t :: a) (t :: [Bool]).+ Sing t -> Sing t -> Sing (Apply (Apply FooListSym0 t) t :: [Bool])+ default sFooList ::+ forall (t :: a) (t :: [Bool]).+ (Apply (Apply FooListSym0 t) t :: [Bool]) ~ Apply (Apply FooList_0123456789876543210Sym0 t) t =>+ Sing t -> Sing t -> Sing (Apply (Apply FooListSym0 t) t :: [Bool])+ sFooList+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = undefined+ instance SFoo a => SFoo [a] where+ sFoosPrec ::+ forall (t :: Nat) (t :: [a]) (t :: [Bool]).+ Sing t+ -> Sing t+ -> Sing t+ -> Sing (Apply (Apply (Apply FoosPrecSym0 t) t) t :: [Bool])+ sFoosPrec+ _+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ ((applySing ((singFun2 @FooListSym0) sFooList))+ sA_0123456789876543210))+ sA_0123456789876543210
+ tests/compile-and-dump/Singletons/T167.hs view
@@ -0,0 +1,27 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DefaultSignatures #-}+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE InstanceSigs #-}+{-# LANGUAGE KindSignatures #-}+{-# LANGUAGE PolyKinds #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeInType #-}+{-# LANGUAGE UndecidableInstances #-}+module Singletons.T167 where++import Data.Singletons.TH+import GHC.TypeLits++type DiffList = [Bool] -> [Bool]++$(singletonsOnly [d|+ class Foo a where+ foosPrec :: Nat -> a -> DiffList+ fooList :: a -> DiffList+ fooList = undefined++ instance Foo a => Foo [a] where+ foosPrec _ = fooList+ |])
+ tests/compile-and-dump/Singletons/T172.ghc82.template view
@@ -0,0 +1,30 @@+Singletons/T172.hs:(0,0)-(0,0): Splicing declarations+ singletonsOnly+ [d| ($>) :: Nat -> Nat -> Nat+ ($>) = (+) |]+ ======>+ type ($>$$$) (t :: Nat) (t :: Nat) = ($>) t t+ instance SuppressUnusedWarnings ($>$$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:$>$$###)) GHC.Tuple.())+ data ($>$$) (l :: Nat) (l :: TyFun Nat Nat)+ = forall arg. SameKind (Apply (($>$$) l) arg) (($>$$$) l arg) =>+ (:$>$$###)+ type instance Apply (($>$$) l) l = ($>) l l+ instance SuppressUnusedWarnings ($>$) where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) (:$>$###)) GHC.Tuple.())+ data ($>$) (l :: TyFun Nat (TyFun Nat Nat -> GHC.Types.Type))+ = forall arg. SameKind (Apply ($>$) arg) (($>$$) arg) => (:$>$###)+ type instance Apply ($>$) l = ($>$$) l+ type family ($>) (a :: Nat) (a :: Nat) :: Nat where+ ($>) a_0123456789876543210 a_0123456789876543210 = Apply (Apply (:+$) a_0123456789876543210) a_0123456789876543210+ (%$>) ::+ forall (t :: Nat) (t :: Nat).+ Sing t -> Sing t -> Sing (Apply (Apply ($>$) t) t :: Nat)+ (%$>)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ ((applySing ((singFun2 @(:+$)) (%:+))) sA_0123456789876543210))+ sA_0123456789876543210
+ tests/compile-and-dump/Singletons/T172.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE PolyKinds #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE UndecidableInstances #-}+module T172 where++import Data.Singletons.Prelude+import Data.Singletons.TH+import Data.Singletons.TypeLits++$(singletonsOnly [d|+ ($>) :: Nat -> Nat -> Nat+ ($>) = (+)+ |])
+ tests/compile-and-dump/Singletons/T175.ghc82.template view
@@ -0,0 +1,45 @@+Singletons/T175.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| quux2 :: Bar2 a => a+ quux2 = baz+ + class Foo a where+ baz :: a+ class Foo a => Bar1 a where+ quux1 :: a+ quux1 = baz+ class Foo a => Bar2 a |]+ ======>+ class Foo a where+ baz :: a+ class Foo a => Bar1 a where+ quux1 :: a+ quux1 = baz+ class Foo a => Bar2 a+ quux2 :: Bar2 a => a+ quux2 = baz+ type Quux2Sym0 = Quux2+ type family Quux2 :: a where+ = BazSym0+ type BazSym0 = Baz+ class PFoo (a :: GHC.Types.Type) where+ type Baz :: a+ type Quux1Sym0 = Quux1+ type family Quux1_0123456789876543210 :: a where+ = BazSym0+ type Quux1_0123456789876543210Sym0 = Quux1_0123456789876543210+ class PFoo a => PBar1 (a :: GHC.Types.Type) where+ type Quux1 :: a+ type Quux1 = Quux1_0123456789876543210Sym0+ class PFoo a => PBar2 (a :: GHC.Types.Type)+ sQuux2 :: SBar2 a => Sing (Quux2Sym0 :: a)+ sQuux2 = sBaz+ class SFoo a where+ sBaz :: Sing (BazSym0 :: a)+ class SFoo a => SBar1 a where+ sQuux1 :: Sing (Quux1Sym0 :: a)+ default sQuux1 ::+ (Quux1Sym0 :: a) ~ Quux1_0123456789876543210Sym0 =>+ Sing (Quux1Sym0 :: a)+ sQuux1 = sBaz+ class SFoo a => SBar2 a
+ tests/compile-and-dump/Singletons/T175.hs view
@@ -0,0 +1,29 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DefaultSignatures #-}+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE PolyKinds #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeInType #-}+{-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE FlexibleContexts #-}++module T175 where++import Data.Singletons.Prelude+import Data.Singletons.TH++$(singletons [d|+ class Foo a where+ baz :: a++ class Foo a => Bar1 a where+ quux1 :: a+ quux1 = baz++ class Foo a => Bar2 a where++ quux2 :: Bar2 a => a+ quux2 = baz+ |])
+ tests/compile-and-dump/Singletons/T176.ghc82.template view
@@ -0,0 +1,137 @@+Singletons/T176.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| quux1 :: Foo1 a => a -> a+ quux1 x = x `bar1` \ _ -> baz1+ quux2 :: Foo2 a => a -> a+ quux2 x = x `bar2` baz2+ + class Foo1 a where+ bar1 :: a -> (a -> b) -> b+ baz1 :: a+ class Foo2 a where+ bar2 :: a -> b -> b+ baz2 :: a |]+ ======>+ class Foo1 a where+ bar1 :: a -> (a -> b) -> b+ baz1 :: a+ quux1 :: Foo1 a => a -> a+ quux1 x = (x `bar1` (\ _ -> baz1))+ class Foo2 a where+ bar2 :: a -> b -> b+ baz2 :: a+ quux2 :: Foo2 a => a -> a+ quux2 x = (x `bar2` baz2)+ type family Case_0123456789876543210 x arg_0123456789876543210 t where+ Case_0123456789876543210 x arg_0123456789876543210 _z_0123456789876543210 = Baz1Sym0+ type family Lambda_0123456789876543210 x t where+ Lambda_0123456789876543210 x arg_0123456789876543210 = Case_0123456789876543210 x arg_0123456789876543210 arg_0123456789876543210+ type Lambda_0123456789876543210Sym2 t t =+ Lambda_0123456789876543210 t t+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym1 l l+ = forall arg. SameKind (Apply (Lambda_0123456789876543210Sym1 l) arg) (Lambda_0123456789876543210Sym2 l arg) =>+ Lambda_0123456789876543210Sym1KindInference+ type instance Apply (Lambda_0123456789876543210Sym1 l) l = Lambda_0123456789876543210 l l+ instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Lambda_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Lambda_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>+ Lambda_0123456789876543210Sym0KindInference+ type instance Apply Lambda_0123456789876543210Sym0 l = Lambda_0123456789876543210Sym1 l+ type Quux2Sym1 (t :: a0123456789876543210) = Quux2 t+ instance SuppressUnusedWarnings Quux2Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Quux2Sym0KindInference) GHC.Tuple.())+ data Quux2Sym0 (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply Quux2Sym0 arg) (Quux2Sym1 arg) =>+ Quux2Sym0KindInference+ type instance Apply Quux2Sym0 l = Quux2 l+ type Quux1Sym1 (t :: a0123456789876543210) = Quux1 t+ instance SuppressUnusedWarnings Quux1Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Quux1Sym0KindInference) GHC.Tuple.())+ data Quux1Sym0 (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply Quux1Sym0 arg) (Quux1Sym1 arg) =>+ Quux1Sym0KindInference+ type instance Apply Quux1Sym0 l = Quux1 l+ type family Quux2 (a :: a) :: a where+ Quux2 x = Apply (Apply Bar2Sym0 x) Baz2Sym0+ type family Quux1 (a :: a) :: a where+ Quux1 x = Apply (Apply Bar1Sym0 x) (Apply Lambda_0123456789876543210Sym0 x)+ type Bar1Sym2 (t :: a0123456789876543210) (t :: TyFun a0123456789876543210 b0123456789876543210+ -> Type) =+ Bar1 t t+ instance SuppressUnusedWarnings Bar1Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Bar1Sym1KindInference) GHC.Tuple.())+ data Bar1Sym1 (l :: a0123456789876543210) (l :: TyFun (TyFun a0123456789876543210 b0123456789876543210+ -> Type) b0123456789876543210)+ = forall arg. SameKind (Apply (Bar1Sym1 l) arg) (Bar1Sym2 l arg) =>+ Bar1Sym1KindInference+ type instance Apply (Bar1Sym1 l) l = Bar1 l l+ instance SuppressUnusedWarnings Bar1Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Bar1Sym0KindInference) GHC.Tuple.())+ data Bar1Sym0 (l :: TyFun a0123456789876543210 (TyFun (TyFun a0123456789876543210 b0123456789876543210+ -> Type) b0123456789876543210+ -> Type))+ = forall arg. SameKind (Apply Bar1Sym0 arg) (Bar1Sym1 arg) =>+ Bar1Sym0KindInference+ type instance Apply Bar1Sym0 l = Bar1Sym1 l+ type Baz1Sym0 = Baz1+ class PFoo1 (a :: Type) where+ type Bar1 (arg :: a) (arg :: TyFun a b -> Type) :: b+ type Baz1 :: a+ type Bar2Sym2 (t :: a0123456789876543210) (t :: b0123456789876543210) =+ Bar2 t t+ instance SuppressUnusedWarnings Bar2Sym1 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Bar2Sym1KindInference) GHC.Tuple.())+ data Bar2Sym1 (l :: a0123456789876543210) (l :: TyFun b0123456789876543210 b0123456789876543210)+ = forall arg. SameKind (Apply (Bar2Sym1 l) arg) (Bar2Sym2 l arg) =>+ Bar2Sym1KindInference+ type instance Apply (Bar2Sym1 l) l = Bar2 l l+ instance SuppressUnusedWarnings Bar2Sym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) Bar2Sym0KindInference) GHC.Tuple.())+ data Bar2Sym0 (l :: TyFun a0123456789876543210 (TyFun b0123456789876543210 b0123456789876543210+ -> Type))+ = forall arg. SameKind (Apply Bar2Sym0 arg) (Bar2Sym1 arg) =>+ Bar2Sym0KindInference+ type instance Apply Bar2Sym0 l = Bar2Sym1 l+ type Baz2Sym0 = Baz2+ class PFoo2 (a :: Type) where+ type Bar2 (arg :: a) (arg :: b) :: b+ type Baz2 :: a+ sQuux2 ::+ forall (t :: a). SFoo2 a => Sing t -> Sing (Apply Quux2Sym0 t :: a)+ sQuux1 ::+ forall (t :: a). SFoo1 a => Sing t -> Sing (Apply Quux1Sym0 t :: a)+ sQuux2 (sX :: Sing x)+ = (applySing ((applySing ((singFun2 @Bar2Sym0) sBar2)) sX)) sBaz2+ sQuux1 (sX :: Sing x)+ = (applySing ((applySing ((singFun2 @Bar1Sym0) sBar1)) sX))+ ((singFun1 @(Apply Lambda_0123456789876543210Sym0 x))+ (\ sArg_0123456789876543210+ -> case sArg_0123456789876543210 of {+ _ :: Sing arg_0123456789876543210+ -> case sArg_0123456789876543210 of { _ -> sBaz1 } ::+ Sing (Case_0123456789876543210 x arg_0123456789876543210 arg_0123456789876543210) }))+ class SFoo1 a where+ sBar1 ::+ forall (t :: a) (t :: TyFun a b -> Type).+ Sing t -> Sing t -> Sing (Apply (Apply Bar1Sym0 t) t :: b)+ sBaz1 :: Sing (Baz1Sym0 :: a)+ class SFoo2 a where+ sBar2 ::+ forall (t :: a) (t :: b).+ Sing t -> Sing t -> Sing (Apply (Apply Bar2Sym0 t) t :: b)+ sBaz2 :: Sing (Baz2Sym0 :: a)
+ tests/compile-and-dump/Singletons/T176.hs view
@@ -0,0 +1,30 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DefaultSignatures #-}+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE PolyKinds #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeInType #-}+{-# LANGUAGE UndecidableInstances #-}+module T176 where++import Data.Kind (Type)+import Data.Singletons.Prelude+import Data.Singletons.TH++$(singletons [d|+ class Foo1 a where+ bar1 :: a -> (a -> b) -> b+ baz1 :: a++ quux1 :: Foo1 a => a -> a+ quux1 x = x `bar1` \_ -> baz1++ class Foo2 a where+ bar2 :: a -> b -> b+ baz2 :: a++ quux2 :: Foo2 a => a -> a+ quux2 x = x `bar2` baz2+ |])
+ tests/compile-and-dump/Singletons/T178.ghc82.template view
@@ -0,0 +1,161 @@+Singletons/T178.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| empty :: U+ empty = []+ + data Occ+ = Str | Opt | Many+ deriving (Eq, Ord, Show)+ type U = [(Symbol, Occ)] |]+ ======>+ data Occ+ = Str | Opt | Many+ deriving (Eq, Ord, Show)+ type U = [(Symbol, Occ)]+ empty :: U+ empty = []+ type family Equals_0123456789876543210 (a :: Occ) (b :: Occ) :: Bool where+ Equals_0123456789876543210 Str Str = TrueSym0+ Equals_0123456789876543210 Opt Opt = TrueSym0+ Equals_0123456789876543210 Many Many = TrueSym0+ Equals_0123456789876543210 (a :: Occ) (b :: Occ) = FalseSym0+ instance PEq Occ where+ type (:==) (a :: Occ) (b :: Occ) = Equals_0123456789876543210 a b+ type StrSym0 = Str+ type OptSym0 = Opt+ type ManySym0 = Many+ type EmptySym0 = Empty+ type family Empty :: [(Symbol, Occ)] where+ = '[]+ type family Compare_0123456789876543210 (a :: Occ) (a :: Occ) :: Ordering where+ Compare_0123456789876543210 Str Str = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]+ Compare_0123456789876543210 Opt Opt = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]+ Compare_0123456789876543210 Many Many = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]+ Compare_0123456789876543210 Str Opt = LTSym0+ Compare_0123456789876543210 Str Many = LTSym0+ Compare_0123456789876543210 Opt Str = GTSym0+ Compare_0123456789876543210 Opt Many = LTSym0+ Compare_0123456789876543210 Many Str = GTSym0+ Compare_0123456789876543210 Many Opt = GTSym0+ type Compare_0123456789876543210Sym2 (t :: Occ) (t :: Occ) =+ Compare_0123456789876543210 t t+ instance SuppressUnusedWarnings Compare_0123456789876543210Sym1 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym1KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym1 (l :: Occ) (l :: TyFun Occ Ordering)+ = forall arg. SameKind (Apply (Compare_0123456789876543210Sym1 l) arg) (Compare_0123456789876543210Sym2 l arg) =>+ Compare_0123456789876543210Sym1KindInference+ type instance Apply (Compare_0123456789876543210Sym1 l) l = Compare_0123456789876543210 l l+ instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,) Compare_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Compare_0123456789876543210Sym0 (l :: TyFun Occ (TyFun Occ Ordering+ -> GHC.Types.Type))+ = forall arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>+ Compare_0123456789876543210Sym0KindInference+ type instance Apply Compare_0123456789876543210Sym0 l = Compare_0123456789876543210Sym1 l+ instance POrd Occ where+ type Compare (a :: Occ) (a :: Occ) = Apply (Apply Compare_0123456789876543210Sym0 a) a+ sEmpty :: Sing (EmptySym0 :: [(Symbol, Occ)])+ sEmpty = SNil+ data instance Sing (z :: Occ)+ = z ~ Str => SStr | z ~ Opt => SOpt | z ~ Many => SMany+ type SOcc = (Sing :: Occ -> GHC.Types.Type)+ instance SingKind Occ where+ type Demote Occ = Occ+ fromSing SStr = Str+ fromSing SOpt = Opt+ fromSing SMany = Many+ toSing Str = SomeSing SStr+ toSing Opt = SomeSing SOpt+ toSing Many = SomeSing SMany+ instance SEq Occ where+ (%:==) SStr SStr = STrue+ (%:==) SStr SOpt = SFalse+ (%:==) SStr SMany = SFalse+ (%:==) SOpt SStr = SFalse+ (%:==) SOpt SOpt = STrue+ (%:==) SOpt SMany = SFalse+ (%:==) SMany SStr = SFalse+ (%:==) SMany SOpt = SFalse+ (%:==) SMany SMany = STrue+ instance SDecide Occ where+ (%~) SStr SStr = Proved Refl+ (%~) SStr SOpt+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SStr SMany+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SOpt SStr+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SOpt SOpt = Proved Refl+ (%~) SOpt SMany+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SMany SStr+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SMany SOpt+ = Disproved+ (\ x+ -> case x of {+ _ -> error "Empty case reached -- this should be impossible" })+ (%~) SMany SMany = Proved Refl+ instance SOrd Occ where+ sCompare ::+ forall (t1 :: Occ) (t2 :: Occ).+ Sing t1+ -> Sing t2+ -> Sing (Apply (Apply (CompareSym0 :: TyFun Occ (TyFun Occ Ordering+ -> GHC.Types.Type)+ -> GHC.Types.Type) t1 :: TyFun Occ Ordering+ -> GHC.Types.Type) t2 :: Ordering)+ sCompare SStr SStr+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ SNil+ sCompare SOpt SOpt+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ SNil+ sCompare SMany SMany+ = (applySing+ ((applySing+ ((applySing ((singFun3 @FoldlSym0) sFoldl))+ ((singFun2 @ThenCmpSym0) sThenCmp)))+ SEQ))+ SNil+ sCompare SStr SOpt = SLT+ sCompare SStr SMany = SLT+ sCompare SOpt SStr = SGT+ sCompare SOpt SMany = SLT+ sCompare SMany SStr = SGT+ sCompare SMany SOpt = SGT+ instance SingI Str where+ sing = SStr+ instance SingI Opt where+ sing = SOpt+ instance SingI Many where+ sing = SMany
+ tests/compile-and-dump/Singletons/T178.hs view
@@ -0,0 +1,16 @@+module T178 where++import GHC.TypeLits+import Data.Singletons.TH+import Data.Singletons.Prelude++$(singletons [d|++ -- Note: Ord automatically defines "max"+ data Occ = Str | Opt | Many deriving (Eq, Ord, Show)++ type U = [(Symbol,Occ)]++ empty :: U+ empty = []+ |])
− tests/compile-and-dump/Singletons/T29.ghc80.template
@@ -1,127 +0,0 @@-Singletons/T29.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| foo :: Bool -> Bool- foo x = not $ x- bar :: Bool -> Bool- bar x = not . not . not $ x- baz :: Bool -> Bool- baz x = not $! x- ban :: Bool -> Bool- ban x = not . not . not $! x |]- ======>- foo :: Bool -> Bool- foo x = (not $ x)- bar :: Bool -> Bool- bar x = ((not . (not . not)) $ x)- baz :: Bool -> Bool- baz x = (not $! x)- ban :: Bool -> Bool- ban x = ((not . (not . not)) $! x)- type BanSym1 (t :: Bool) = Ban t- instance SuppressUnusedWarnings BanSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BanSym0KindInference GHC.Tuple.())- data BanSym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply BanSym0 arg) ~ KindOf (BanSym1 arg) =>- BanSym0KindInference- type instance Apply BanSym0 l = BanSym1 l- type BazSym1 (t :: Bool) = Baz t- instance SuppressUnusedWarnings BazSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BazSym0KindInference GHC.Tuple.())- data BazSym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply BazSym0 arg) ~ KindOf (BazSym1 arg) =>- BazSym0KindInference- type instance Apply BazSym0 l = BazSym1 l- type BarSym1 (t :: Bool) = Bar t- instance SuppressUnusedWarnings BarSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BarSym0KindInference GHC.Tuple.())- data BarSym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply BarSym0 arg) ~ KindOf (BarSym1 arg) =>- BarSym0KindInference- type instance Apply BarSym0 l = BarSym1 l- type FooSym1 (t :: Bool) = Foo t- instance SuppressUnusedWarnings FooSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym0KindInference GHC.Tuple.())- data FooSym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply FooSym0 arg) ~ KindOf (FooSym1 arg) =>- FooSym0KindInference- type instance Apply FooSym0 l = FooSym1 l- type family Ban (a :: Bool) :: Bool where- Ban x = Apply (Apply ($!$) (Apply (Apply (:.$) NotSym0) (Apply (Apply (:.$) NotSym0) NotSym0))) x- type family Baz (a :: Bool) :: Bool where- Baz x = Apply (Apply ($!$) NotSym0) x- type family Bar (a :: Bool) :: Bool where- Bar x = Apply (Apply ($$) (Apply (Apply (:.$) NotSym0) (Apply (Apply (:.$) NotSym0) NotSym0))) x- type family Foo (a :: Bool) :: Bool where- Foo x = Apply (Apply ($$) NotSym0) x- sBan ::- forall (t :: Bool). Sing t -> Sing (Apply BanSym0 t :: Bool)- sBaz ::- forall (t :: Bool). Sing t -> Sing (Apply BazSym0 t :: Bool)- sBar ::- forall (t :: Bool). Sing t -> Sing (Apply BarSym0 t :: Bool)- sFoo ::- forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)- sBan sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply BanSym0 t :: Bool)- lambda x- = applySing- (applySing- (singFun2 (Proxy :: Proxy ($!$)) (%$!))- (applySing- (applySing- (singFun3 (Proxy :: Proxy (:.$)) (%:.))- (singFun1 (Proxy :: Proxy NotSym0) sNot))- (applySing- (applySing- (singFun3 (Proxy :: Proxy (:.$)) (%:.))- (singFun1 (Proxy :: Proxy NotSym0) sNot))- (singFun1 (Proxy :: Proxy NotSym0) sNot))))- x- in lambda sX- sBaz sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply BazSym0 t :: Bool)- lambda x- = applySing- (applySing- (singFun2 (Proxy :: Proxy ($!$)) (%$!))- (singFun1 (Proxy :: Proxy NotSym0) sNot))- x- in lambda sX- sBar sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply BarSym0 t :: Bool)- lambda x- = applySing- (applySing- (singFun2 (Proxy :: Proxy ($$)) (%$))- (applySing- (applySing- (singFun3 (Proxy :: Proxy (:.$)) (%:.))- (singFun1 (Proxy :: Proxy NotSym0) sNot))- (applySing- (applySing- (singFun3 (Proxy :: Proxy (:.$)) (%:.))- (singFun1 (Proxy :: Proxy NotSym0) sNot))- (singFun1 (Proxy :: Proxy NotSym0) sNot))))- x- in lambda sX- sFoo sX- = let- lambda ::- forall x. t ~ x => Sing x -> Sing (Apply FooSym0 t :: Bool)- lambda x- = applySing- (applySing- (singFun2 (Proxy :: Proxy ($$)) (%$))- (singFun1 (Proxy :: Proxy NotSym0) sNot))- x- in lambda sX
+ tests/compile-and-dump/Singletons/T29.ghc82.template view
@@ -0,0 +1,93 @@+Singletons/T29.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| foo :: Bool -> Bool+ foo x = not $ x+ bar :: Bool -> Bool+ bar x = not . not . not $ x+ baz :: Bool -> Bool+ baz x = not $! x+ ban :: Bool -> Bool+ ban x = not . not . not $! x |]+ ======>+ foo :: Bool -> Bool+ foo x = (not $ x)+ bar :: Bool -> Bool+ bar x = ((not . (not . not)) $ x)+ baz :: Bool -> Bool+ baz x = (not $! x)+ ban :: Bool -> Bool+ ban x = ((not . (not . not)) $! x)+ type BanSym1 (t :: Bool) = Ban t+ instance SuppressUnusedWarnings BanSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BanSym0KindInference) GHC.Tuple.())+ data BanSym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply BanSym0 arg) (BanSym1 arg) =>+ BanSym0KindInference+ type instance Apply BanSym0 l = Ban l+ type BazSym1 (t :: Bool) = Baz t+ instance SuppressUnusedWarnings BazSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BazSym0KindInference) GHC.Tuple.())+ data BazSym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) =>+ BazSym0KindInference+ type instance Apply BazSym0 l = Baz l+ type BarSym1 (t :: Bool) = Bar t+ instance SuppressUnusedWarnings BarSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BarSym0KindInference) GHC.Tuple.())+ data BarSym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>+ BarSym0KindInference+ type instance Apply BarSym0 l = Bar l+ type FooSym1 (t :: Bool) = Foo t+ instance SuppressUnusedWarnings FooSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym0KindInference) GHC.Tuple.())+ data FooSym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>+ FooSym0KindInference+ type instance Apply FooSym0 l = Foo l+ type family Ban (a :: Bool) :: Bool where+ Ban x = Apply (Apply ($!$) (Apply (Apply (:.$) NotSym0) (Apply (Apply (:.$) NotSym0) NotSym0))) x+ type family Baz (a :: Bool) :: Bool where+ Baz x = Apply (Apply ($!$) NotSym0) x+ type family Bar (a :: Bool) :: Bool where+ Bar x = Apply (Apply ($$) (Apply (Apply (:.$) NotSym0) (Apply (Apply (:.$) NotSym0) NotSym0))) x+ type family Foo (a :: Bool) :: Bool where+ Foo x = Apply (Apply ($$) NotSym0) x+ sBan ::+ forall (t :: Bool). Sing t -> Sing (Apply BanSym0 t :: Bool)+ sBaz ::+ forall (t :: Bool). Sing t -> Sing (Apply BazSym0 t :: Bool)+ sBar ::+ forall (t :: Bool). Sing t -> Sing (Apply BarSym0 t :: Bool)+ sFoo ::+ forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)+ sBan (sX :: Sing x)+ = (applySing+ ((applySing ((singFun2 @($!$)) (%$!)))+ ((applySing+ ((applySing ((singFun3 @(:.$)) (%:.))) ((singFun1 @NotSym0) sNot)))+ ((applySing+ ((applySing ((singFun3 @(:.$)) (%:.))) ((singFun1 @NotSym0) sNot)))+ ((singFun1 @NotSym0) sNot)))))+ sX+ sBaz (sX :: Sing x)+ = (applySing+ ((applySing ((singFun2 @($!$)) (%$!))) ((singFun1 @NotSym0) sNot)))+ sX+ sBar (sX :: Sing x)+ = (applySing+ ((applySing ((singFun2 @($$)) (%$)))+ ((applySing+ ((applySing ((singFun3 @(:.$)) (%:.))) ((singFun1 @NotSym0) sNot)))+ ((applySing+ ((applySing ((singFun3 @(:.$)) (%:.))) ((singFun1 @NotSym0) sNot)))+ ((singFun1 @NotSym0) sNot)))))+ sX+ sFoo (sX :: Sing x)+ = (applySing+ ((applySing ((singFun2 @($$)) (%$))) ((singFun1 @NotSym0) sNot)))+ sX
− tests/compile-and-dump/Singletons/T33.ghc80.template
@@ -1,34 +0,0 @@-Singletons/T33.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| foo :: (Bool, Bool) -> ()- foo ~(_, _) = () |]- ======>- foo :: (Bool, Bool) -> ()- foo ~(_, _) = GHC.Tuple.()- type FooSym1 (t :: (Bool, Bool)) = Foo t- instance SuppressUnusedWarnings FooSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym0KindInference GHC.Tuple.())- data FooSym0 (l :: TyFun (Bool, Bool) ())- = forall arg. KindOf (Apply FooSym0 arg) ~ KindOf (FooSym1 arg) =>- FooSym0KindInference- type instance Apply FooSym0 l = FooSym1 l- type family Foo (a :: (Bool, Bool)) :: () where- Foo '(_z_0123456789, _z_0123456789) = Tuple0Sym0- sFoo ::- forall (t :: (Bool, Bool)). Sing t -> Sing (Apply FooSym0 t :: ())- sFoo (STuple2 _s_z_0123456789 _s_z_0123456789)- = let- lambda ::- forall _z_0123456789 _z_0123456789.- t ~ Apply (Apply Tuple2Sym0 _z_0123456789) _z_0123456789 =>- Sing _z_0123456789- -> Sing _z_0123456789 -> Sing (Apply FooSym0 t :: ())- lambda _z_0123456789 _z_0123456789 = STuple0- in lambda _s_z_0123456789 _s_z_0123456789--Singletons/T33.hs:0:0: warning:- Lazy pattern converted into regular pattern in promotion--Singletons/T33.hs:0:0: warning:- Lazy pattern converted into regular pattern during singleton generation.
+ tests/compile-and-dump/Singletons/T33.ghc82.template view
@@ -0,0 +1,32 @@+Singletons/T33.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| foo :: (Bool, Bool) -> ()+ foo ~(_, _) = () |]+ ======>+ foo :: (Bool, Bool) -> ()+ foo ~(_, _) = GHC.Tuple.()+ type FooSym1 (t :: (Bool, Bool)) = Foo t+ instance SuppressUnusedWarnings FooSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym0KindInference) GHC.Tuple.())+ data FooSym0 (l :: TyFun (Bool, Bool) ())+ = forall arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>+ FooSym0KindInference+ type instance Apply FooSym0 l = Foo l+ type family Foo (a :: (Bool, Bool)) :: () where+ Foo '(_z_0123456789876543210, _z_0123456789876543210) = Tuple0Sym0+ sFoo ::+ forall (t :: (Bool, Bool)). Sing t -> Sing (Apply FooSym0 t :: ())+ sFoo (STuple2 _ _) = STuple0++Singletons/T33.hs:0:0: warning:+ Lazy pattern converted into regular pattern in promotion+ |+6 | $(singletons [d|+ | ^^^^^^^^^^^^^^...++Singletons/T33.hs:0:0: warning:+ Lazy pattern converted into regular pattern during singleton generation.+ |+6 | $(singletons [d|+ | ^^^^^^^^^^^^^^...
− tests/compile-and-dump/Singletons/T54.ghc80.template
@@ -1,60 +0,0 @@-Singletons/T54.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| g :: Bool -> Bool- g e = (case [not] of { [_] -> not }) e |]- ======>- g :: Bool -> Bool- g e = case [not] of { [_] -> not } e- type Let0123456789Scrutinee_0123456789Sym1 t =- Let0123456789Scrutinee_0123456789 t- instance SuppressUnusedWarnings Let0123456789Scrutinee_0123456789Sym0 where- suppressUnusedWarnings _- = snd- (GHC.Tuple.(,)- Let0123456789Scrutinee_0123456789Sym0KindInference GHC.Tuple.())- data Let0123456789Scrutinee_0123456789Sym0 l- = forall arg. KindOf (Apply Let0123456789Scrutinee_0123456789Sym0 arg) ~ KindOf (Let0123456789Scrutinee_0123456789Sym1 arg) =>- Let0123456789Scrutinee_0123456789Sym0KindInference- type instance Apply Let0123456789Scrutinee_0123456789Sym0 l = Let0123456789Scrutinee_0123456789Sym1 l- type family Let0123456789Scrutinee_0123456789 e where- Let0123456789Scrutinee_0123456789 e = Apply (Apply (:$) NotSym0) '[]- type family Case_0123456789 e t where- Case_0123456789 e '[_z_0123456789] = NotSym0- type GSym1 (t :: Bool) = G t- instance SuppressUnusedWarnings GSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) GSym0KindInference GHC.Tuple.())- data GSym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply GSym0 arg) ~ KindOf (GSym1 arg) =>- GSym0KindInference- type instance Apply GSym0 l = GSym1 l- type family G (a :: Bool) :: Bool where- G e = Apply (Case_0123456789 e (Let0123456789Scrutinee_0123456789Sym1 e)) e- sG :: forall (t :: Bool). Sing t -> Sing (Apply GSym0 t :: Bool)- sG sE- = let- lambda :: forall e. t ~ e => Sing e -> Sing (Apply GSym0 t :: Bool)- lambda e- = applySing- (let- sScrutinee_0123456789 ::- Sing (Let0123456789Scrutinee_0123456789Sym1 e)- sScrutinee_0123456789- = applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (singFun1 (Proxy :: Proxy NotSym0) sNot))- SNil- in case sScrutinee_0123456789 of {- SCons _s_z_0123456789 SNil- -> let- lambda ::- forall _z_0123456789.- Apply (Apply (:$) _z_0123456789) '[] ~ Let0123456789Scrutinee_0123456789Sym1 e =>- Sing _z_0123456789- -> Sing (Case_0123456789 e (Apply (Apply (:$) _z_0123456789) '[]))- lambda _z_0123456789 = singFun1 (Proxy :: Proxy NotSym0) sNot- in lambda _s_z_0123456789 } ::- Sing (Case_0123456789 e (Let0123456789Scrutinee_0123456789Sym1 e)))- e- in lambda sE
+ tests/compile-and-dump/Singletons/T54.ghc82.template view
@@ -0,0 +1,47 @@+Singletons/T54.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| g :: Bool -> Bool+ g e = (case [not] of { [_] -> not }) e |]+ ======>+ g :: Bool -> Bool+ g e = (case [not] of { [_] -> not }) e+ type Let0123456789876543210Scrutinee_0123456789876543210Sym1 t =+ Let0123456789876543210Scrutinee_0123456789876543210 t+ instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where+ suppressUnusedWarnings _+ = snd+ ((GHC.Tuple.(,)+ Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)+ GHC.Tuple.())+ data Let0123456789876543210Scrutinee_0123456789876543210Sym0 l+ = forall arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>+ Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference+ type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 l = Let0123456789876543210Scrutinee_0123456789876543210 l+ type family Let0123456789876543210Scrutinee_0123456789876543210 e where+ Let0123456789876543210Scrutinee_0123456789876543210 e = Apply (Apply (:$) NotSym0) '[]+ type family Case_0123456789876543210 e t where+ Case_0123456789876543210 e '[_z_0123456789876543210] = NotSym0+ type GSym1 (t :: Bool) = G t+ instance SuppressUnusedWarnings GSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) GSym0KindInference) GHC.Tuple.())+ data GSym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply GSym0 arg) (GSym1 arg) =>+ GSym0KindInference+ type instance Apply GSym0 l = G l+ type family G (a :: Bool) :: Bool where+ G e = Apply (Case_0123456789876543210 e (Let0123456789876543210Scrutinee_0123456789876543210Sym1 e)) e+ sG :: forall (t :: Bool). Sing t -> Sing (Apply GSym0 t :: Bool)+ sG (sE :: Sing e)+ = (applySing+ (let+ sScrutinee_0123456789876543210 ::+ Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 e)+ sScrutinee_0123456789876543210+ = (applySing+ ((applySing ((singFun2 @(:$)) SCons)) ((singFun1 @NotSym0) sNot)))+ SNil+ in case sScrutinee_0123456789876543210 of {+ SCons _ SNil -> (singFun1 @NotSym0) sNot } ::+ Sing (Case_0123456789876543210 e (Let0123456789876543210Scrutinee_0123456789876543210Sym1 e))))+ sE
− tests/compile-and-dump/Singletons/T78.ghc80.template
@@ -1,42 +0,0 @@-Singletons/T78.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| foo :: MaybeBool -> Bool- foo (Just False) = False- foo (Just True) = True- foo Nothing = False |]- ======>- foo :: MaybeBool -> Bool- foo (Just False) = False- foo (Just True) = True- foo Nothing = False- type FooSym1 (t :: Maybe Bool) = Foo t- instance SuppressUnusedWarnings FooSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym0KindInference GHC.Tuple.())- data FooSym0 (l :: TyFun (Maybe Bool) Bool)- = forall arg. KindOf (Apply FooSym0 arg) ~ KindOf (FooSym1 arg) =>- FooSym0KindInference- type instance Apply FooSym0 l = FooSym1 l- type family Foo (a :: Maybe Bool) :: Bool where- Foo (Just False) = FalseSym0- Foo (Just True) = TrueSym0- Foo Nothing = FalseSym0- sFoo ::- forall (t :: Maybe Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)- sFoo (SJust SFalse)- = let- lambda ::- t ~ Apply JustSym0 FalseSym0 => Sing (Apply FooSym0 t :: Bool)- lambda = SFalse- in lambda- sFoo (SJust STrue)- = let- lambda ::- t ~ Apply JustSym0 TrueSym0 => Sing (Apply FooSym0 t :: Bool)- lambda = STrue- in lambda- sFoo SNothing- = let- lambda :: t ~ NothingSym0 => Sing (Apply FooSym0 t :: Bool)- lambda = SFalse- in lambda
+ tests/compile-and-dump/Singletons/T78.ghc82.template view
@@ -0,0 +1,28 @@+Singletons/T78.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| foo :: MaybeBool -> Bool+ foo (Just False) = False+ foo (Just True) = True+ foo Nothing = False |]+ ======>+ foo :: MaybeBool -> Bool+ foo (Just False) = False+ foo (Just True) = True+ foo Nothing = False+ type FooSym1 (t :: Maybe Bool) = Foo t+ instance SuppressUnusedWarnings FooSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym0KindInference) GHC.Tuple.())+ data FooSym0 (l :: TyFun (Maybe Bool) Bool)+ = forall arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>+ FooSym0KindInference+ type instance Apply FooSym0 l = Foo l+ type family Foo (a :: Maybe Bool) :: Bool where+ Foo (Just False) = FalseSym0+ Foo (Just True) = TrueSym0+ Foo Nothing = FalseSym0+ sFoo ::+ forall (t :: Maybe Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)+ sFoo (SJust SFalse) = SFalse+ sFoo (SJust STrue) = STrue+ sFoo SNothing = SFalse
− tests/compile-and-dump/Singletons/TopLevelPatterns.ghc80.template
@@ -1,407 +0,0 @@-Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| data Bool = False | True- data Foo = Bar Bool Bool |]- ======>- data Bool = False | True- data Foo = Bar Bool Bool- type FalseSym0 = False- type TrueSym0 = True- type BarSym2 (t :: Bool) (t :: Bool) = Bar t t- instance SuppressUnusedWarnings BarSym1 where- suppressUnusedWarnings _- = Data.Tuple.snd (GHC.Tuple.(,) BarSym1KindInference GHC.Tuple.())- data BarSym1 (l :: Bool) (l :: TyFun Bool Foo)- = forall arg. KindOf (Apply (BarSym1 l) arg) ~ KindOf (BarSym2 l arg) =>- BarSym1KindInference- type instance Apply (BarSym1 l) l = BarSym2 l l- instance SuppressUnusedWarnings BarSym0 where- suppressUnusedWarnings _- = Data.Tuple.snd (GHC.Tuple.(,) BarSym0KindInference GHC.Tuple.())- data BarSym0 (l :: TyFun Bool (TyFun Bool Foo -> GHC.Types.Type))- = forall arg. KindOf (Apply BarSym0 arg) ~ KindOf (BarSym1 arg) =>- BarSym0KindInference- type instance Apply BarSym0 l = BarSym1 l- data instance Sing (z :: Bool)- = z ~ False => SFalse | z ~ True => STrue- type SBool = (Sing :: Bool -> GHC.Types.Type)- instance SingKind Bool where- type DemoteRep Bool = Bool- fromSing SFalse = False- fromSing STrue = True- toSing False = SomeSing SFalse- toSing True = SomeSing STrue- data instance Sing (z :: Foo)- = forall (n :: Bool) (n :: Bool). z ~ Bar n n =>- SBar (Sing (n :: Bool)) (Sing (n :: Bool))- type SFoo = (Sing :: Foo -> GHC.Types.Type)- instance SingKind Foo where- type DemoteRep Foo = Foo- fromSing (SBar b b) = Bar (fromSing b) (fromSing b)- toSing (Bar b b)- = case- GHC.Tuple.(,)- (toSing b :: SomeSing Bool) (toSing b :: SomeSing Bool)- of {- GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing (SBar c c) }- instance SingI False where- sing = SFalse- instance SingI True where- sing = STrue- instance (SingI n, SingI n) =>- SingI (Bar (n :: Bool) (n :: Bool)) where- sing = SBar sing sing-Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| otherwise :: Bool- otherwise = True- id :: a -> a- id x = x- not :: Bool -> Bool- not True = False- not False = True- false_ = False- f, g :: Bool -> Bool- [f, g] = [not, id]- h, i :: Bool -> Bool- (h, i) = (f, g)- j, k :: Bool- (Bar j k) = Bar True (h False)- l, m :: Bool- [l, m] = [not True, id False] |]- ======>- otherwise :: Bool- otherwise = True- id :: forall a. a -> a- id x = x- not :: Bool -> Bool- not True = False- not False = True- false_ = False- f :: Bool -> Bool- g :: Bool -> Bool- [f, g] = [not, id]- h :: Bool -> Bool- i :: Bool -> Bool- (h, i) = (f, g)- j :: Bool- k :: Bool- Bar j k = Bar True (h False)- l :: Bool- m :: Bool- [l, m] = [not True, id False]- type family Case_0123456789 a_0123456789 t where- Case_0123456789 a_0123456789 '[y_0123456789,- _z_0123456789] = y_0123456789- type family Case_0123456789 a_0123456789 t where- Case_0123456789 a_0123456789 '[_z_0123456789,- y_0123456789] = y_0123456789- type family Case_0123456789 a_0123456789 t where- Case_0123456789 a_0123456789 '(y_0123456789,- _z_0123456789) = y_0123456789- type family Case_0123456789 a_0123456789 t where- Case_0123456789 a_0123456789 '(_z_0123456789,- y_0123456789) = y_0123456789- type family Case_0123456789 t where- Case_0123456789 (Bar y_0123456789 _z_0123456789) = y_0123456789- type family Case_0123456789 t where- Case_0123456789 (Bar _z_0123456789 y_0123456789) = y_0123456789- type family Case_0123456789 t where- Case_0123456789 '[y_0123456789, _z_0123456789] = y_0123456789- type family Case_0123456789 t where- Case_0123456789 '[_z_0123456789, y_0123456789] = y_0123456789- type False_Sym0 = False_- type NotSym1 (t :: Bool) = Not t- instance SuppressUnusedWarnings NotSym0 where- suppressUnusedWarnings _- = Data.Tuple.snd (GHC.Tuple.(,) NotSym0KindInference GHC.Tuple.())- data NotSym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply NotSym0 arg) ~ KindOf (NotSym1 arg) =>- NotSym0KindInference- type instance Apply NotSym0 l = NotSym1 l- type IdSym1 (t :: a0123456789) = Id t- instance SuppressUnusedWarnings IdSym0 where- suppressUnusedWarnings _- = Data.Tuple.snd (GHC.Tuple.(,) IdSym0KindInference GHC.Tuple.())- data IdSym0 (l :: TyFun a0123456789 a0123456789)- = forall arg. KindOf (Apply IdSym0 arg) ~ KindOf (IdSym1 arg) =>- IdSym0KindInference- type instance Apply IdSym0 l = IdSym1 l- type FSym1 (t :: Bool) = F t- instance SuppressUnusedWarnings FSym0 where- suppressUnusedWarnings _- = Data.Tuple.snd (GHC.Tuple.(,) FSym0KindInference GHC.Tuple.())- data FSym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply FSym0 arg) ~ KindOf (FSym1 arg) =>- FSym0KindInference- type instance Apply FSym0 l = FSym1 l- type GSym1 (t :: Bool) = G t- instance SuppressUnusedWarnings GSym0 where- suppressUnusedWarnings _- = Data.Tuple.snd (GHC.Tuple.(,) GSym0KindInference GHC.Tuple.())- data GSym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply GSym0 arg) ~ KindOf (GSym1 arg) =>- GSym0KindInference- type instance Apply GSym0 l = GSym1 l- type HSym1 (t :: Bool) = H t- instance SuppressUnusedWarnings HSym0 where- suppressUnusedWarnings _- = Data.Tuple.snd (GHC.Tuple.(,) HSym0KindInference GHC.Tuple.())- data HSym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply HSym0 arg) ~ KindOf (HSym1 arg) =>- HSym0KindInference- type instance Apply HSym0 l = HSym1 l- type ISym1 (t :: Bool) = I t- instance SuppressUnusedWarnings ISym0 where- suppressUnusedWarnings _- = Data.Tuple.snd (GHC.Tuple.(,) ISym0KindInference GHC.Tuple.())- data ISym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply ISym0 arg) ~ KindOf (ISym1 arg) =>- ISym0KindInference- type instance Apply ISym0 l = ISym1 l- type JSym0 = J- type KSym0 = K- type LSym0 = L- type MSym0 = M- type OtherwiseSym0 = Otherwise- type X_0123456789Sym0 = X_0123456789- type X_0123456789Sym0 = X_0123456789- type X_0123456789Sym0 = X_0123456789- type X_0123456789Sym0 = X_0123456789- type family False_ where- False_ = FalseSym0- type family Not (a :: Bool) :: Bool where- Not True = FalseSym0- Not False = TrueSym0- type family Id (a :: a) :: a where- Id x = x- type family F (a :: Bool) :: Bool where- F a_0123456789 = Apply (Case_0123456789 a_0123456789 X_0123456789Sym0) a_0123456789- type family G (a :: Bool) :: Bool where- G a_0123456789 = Apply (Case_0123456789 a_0123456789 X_0123456789Sym0) a_0123456789- type family H (a :: Bool) :: Bool where- H a_0123456789 = Apply (Case_0123456789 a_0123456789 X_0123456789Sym0) a_0123456789- type family I (a :: Bool) :: Bool where- I a_0123456789 = Apply (Case_0123456789 a_0123456789 X_0123456789Sym0) a_0123456789- type family J :: Bool where- J = Case_0123456789 X_0123456789Sym0- type family K :: Bool where- K = Case_0123456789 X_0123456789Sym0- type family L :: Bool where- L = Case_0123456789 X_0123456789Sym0- type family M :: Bool where- M = Case_0123456789 X_0123456789Sym0- type family Otherwise :: Bool where- Otherwise = TrueSym0- type family X_0123456789 where- X_0123456789 = Apply (Apply (:$) NotSym0) (Apply (Apply (:$) IdSym0) '[])- type family X_0123456789 where- X_0123456789 = Apply (Apply Tuple2Sym0 FSym0) GSym0- type family X_0123456789 where- X_0123456789 = Apply (Apply BarSym0 TrueSym0) (Apply HSym0 FalseSym0)- type family X_0123456789 where- X_0123456789 = Apply (Apply (:$) (Apply NotSym0 TrueSym0)) (Apply (Apply (:$) (Apply IdSym0 FalseSym0)) '[])- sFalse_ :: Sing False_Sym0- sNot ::- forall (t :: Bool). Sing t -> Sing (Apply NotSym0 t :: Bool)- sId :: forall (t :: a). Sing t -> Sing (Apply IdSym0 t :: a)- sF :: forall (t :: Bool). Sing t -> Sing (Apply FSym0 t :: Bool)- sG :: forall (t :: Bool). Sing t -> Sing (Apply GSym0 t :: Bool)- sH :: forall (t :: Bool). Sing t -> Sing (Apply HSym0 t :: Bool)- sI :: forall (t :: Bool). Sing t -> Sing (Apply ISym0 t :: Bool)- sJ :: Sing (JSym0 :: Bool)- sK :: Sing (KSym0 :: Bool)- sL :: Sing (LSym0 :: Bool)- sM :: Sing (MSym0 :: Bool)- sOtherwise :: Sing (OtherwiseSym0 :: Bool)- sX_0123456789 :: Sing X_0123456789Sym0- sX_0123456789 :: Sing X_0123456789Sym0- sX_0123456789 :: Sing X_0123456789Sym0- sX_0123456789 :: Sing X_0123456789Sym0- sFalse_ = SFalse- sNot STrue- = let- lambda :: t ~ TrueSym0 => Sing (Apply NotSym0 t :: Bool)- lambda = SFalse- in lambda- sNot SFalse- = let- lambda :: t ~ FalseSym0 => Sing (Apply NotSym0 t :: Bool)- lambda = STrue- in lambda- sId sX- = let- lambda :: forall x. t ~ x => Sing x -> Sing (Apply IdSym0 t :: a)- lambda x = x- in lambda sX- sF sA_0123456789- = let- lambda ::- forall a_0123456789.- t ~ a_0123456789 =>- Sing a_0123456789 -> Sing (Apply FSym0 t :: Bool)- lambda a_0123456789- = applySing- (case sX_0123456789 of {- SCons sY_0123456789 (SCons _s_z_0123456789 SNil)- -> let- lambda ::- forall y_0123456789 _z_0123456789.- Apply (Apply (:$) y_0123456789) (Apply (Apply (:$) _z_0123456789) '[]) ~ X_0123456789Sym0 =>- Sing y_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 a_0123456789 (Apply (Apply (:$) y_0123456789) (Apply (Apply (:$) _z_0123456789) '[])))- lambda y_0123456789 _z_0123456789 = y_0123456789- in lambda sY_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 a_0123456789 X_0123456789Sym0))- a_0123456789- in lambda sA_0123456789- sG sA_0123456789- = let- lambda ::- forall a_0123456789.- t ~ a_0123456789 =>- Sing a_0123456789 -> Sing (Apply GSym0 t :: Bool)- lambda a_0123456789- = applySing- (case sX_0123456789 of {- SCons _s_z_0123456789 (SCons sY_0123456789 SNil)- -> let- lambda ::- forall _z_0123456789 y_0123456789.- Apply (Apply (:$) _z_0123456789) (Apply (Apply (:$) y_0123456789) '[]) ~ X_0123456789Sym0 =>- Sing _z_0123456789- -> Sing y_0123456789- -> Sing (Case_0123456789 a_0123456789 (Apply (Apply (:$) _z_0123456789) (Apply (Apply (:$) y_0123456789) '[])))- lambda _z_0123456789 y_0123456789 = y_0123456789- in lambda _s_z_0123456789 sY_0123456789 } ::- Sing (Case_0123456789 a_0123456789 X_0123456789Sym0))- a_0123456789- in lambda sA_0123456789- sH sA_0123456789- = let- lambda ::- forall a_0123456789.- t ~ a_0123456789 =>- Sing a_0123456789 -> Sing (Apply HSym0 t :: Bool)- lambda a_0123456789- = applySing- (case sX_0123456789 of {- STuple2 sY_0123456789 _s_z_0123456789- -> let- lambda ::- forall y_0123456789 _z_0123456789.- Apply (Apply Tuple2Sym0 y_0123456789) _z_0123456789 ~ X_0123456789Sym0 =>- Sing y_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 a_0123456789 (Apply (Apply Tuple2Sym0 y_0123456789) _z_0123456789))- lambda y_0123456789 _z_0123456789 = y_0123456789- in lambda sY_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 a_0123456789 X_0123456789Sym0))- a_0123456789- in lambda sA_0123456789- sI sA_0123456789- = let- lambda ::- forall a_0123456789.- t ~ a_0123456789 =>- Sing a_0123456789 -> Sing (Apply ISym0 t :: Bool)- lambda a_0123456789- = applySing- (case sX_0123456789 of {- STuple2 _s_z_0123456789 sY_0123456789- -> let- lambda ::- forall _z_0123456789 y_0123456789.- Apply (Apply Tuple2Sym0 _z_0123456789) y_0123456789 ~ X_0123456789Sym0 =>- Sing _z_0123456789- -> Sing y_0123456789- -> Sing (Case_0123456789 a_0123456789 (Apply (Apply Tuple2Sym0 _z_0123456789) y_0123456789))- lambda _z_0123456789 y_0123456789 = y_0123456789- in lambda _s_z_0123456789 sY_0123456789 } ::- Sing (Case_0123456789 a_0123456789 X_0123456789Sym0))- a_0123456789- in lambda sA_0123456789- sJ- = case sX_0123456789 of {- SBar sY_0123456789 _s_z_0123456789- -> let- lambda ::- forall y_0123456789 _z_0123456789.- Apply (Apply BarSym0 y_0123456789) _z_0123456789 ~ X_0123456789Sym0 =>- Sing y_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 (Apply (Apply BarSym0 y_0123456789) _z_0123456789) :: Bool)- lambda y_0123456789 _z_0123456789 = y_0123456789- in lambda sY_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0 :: Bool)- sK- = case sX_0123456789 of {- SBar _s_z_0123456789 sY_0123456789- -> let- lambda ::- forall _z_0123456789 y_0123456789.- Apply (Apply BarSym0 _z_0123456789) y_0123456789 ~ X_0123456789Sym0 =>- Sing _z_0123456789- -> Sing y_0123456789- -> Sing (Case_0123456789 (Apply (Apply BarSym0 _z_0123456789) y_0123456789) :: Bool)- lambda _z_0123456789 y_0123456789 = y_0123456789- in lambda _s_z_0123456789 sY_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0 :: Bool)- sL- = case sX_0123456789 of {- SCons sY_0123456789 (SCons _s_z_0123456789 SNil)- -> let- lambda ::- forall y_0123456789 _z_0123456789.- Apply (Apply (:$) y_0123456789) (Apply (Apply (:$) _z_0123456789) '[]) ~ X_0123456789Sym0 =>- Sing y_0123456789- -> Sing _z_0123456789- -> Sing (Case_0123456789 (Apply (Apply (:$) y_0123456789) (Apply (Apply (:$) _z_0123456789) '[])) :: Bool)- lambda y_0123456789 _z_0123456789 = y_0123456789- in lambda sY_0123456789 _s_z_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0 :: Bool)- sM- = case sX_0123456789 of {- SCons _s_z_0123456789 (SCons sY_0123456789 SNil)- -> let- lambda ::- forall _z_0123456789 y_0123456789.- Apply (Apply (:$) _z_0123456789) (Apply (Apply (:$) y_0123456789) '[]) ~ X_0123456789Sym0 =>- Sing _z_0123456789- -> Sing y_0123456789- -> Sing (Case_0123456789 (Apply (Apply (:$) _z_0123456789) (Apply (Apply (:$) y_0123456789) '[])) :: Bool)- lambda _z_0123456789 y_0123456789 = y_0123456789- in lambda _s_z_0123456789 sY_0123456789 } ::- Sing (Case_0123456789 X_0123456789Sym0 :: Bool)- sOtherwise = STrue- sX_0123456789- = applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (singFun1 (Proxy :: Proxy NotSym0) sNot))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (singFun1 (Proxy :: Proxy IdSym0) sId))- SNil)- sX_0123456789- = applySing- (applySing- (singFun2 (Proxy :: Proxy Tuple2Sym0) STuple2)- (singFun1 (Proxy :: Proxy FSym0) sF))- (singFun1 (Proxy :: Proxy GSym0) sG)- sX_0123456789- = applySing- (applySing (singFun2 (Proxy :: Proxy BarSym0) SBar) STrue)- (applySing (singFun1 (Proxy :: Proxy HSym0) sH) SFalse)- sX_0123456789- = applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (singFun1 (Proxy :: Proxy NotSym0) sNot) STrue))- (applySing- (applySing- (singFun2 (Proxy :: Proxy (:$)) SCons)- (applySing (singFun1 (Proxy :: Proxy IdSym0) sId) SFalse))- SNil)
+ tests/compile-and-dump/Singletons/TopLevelPatterns.ghc82.template view
@@ -0,0 +1,304 @@+Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| data Bool = False | True+ data Foo = Bar Bool Bool |]+ ======>+ data Bool = False | True+ data Foo = Bar Bool Bool+ type FalseSym0 = False+ type TrueSym0 = True+ type BarSym2 (t :: Bool) (t :: Bool) = Bar t t+ instance SuppressUnusedWarnings BarSym1 where+ suppressUnusedWarnings _+ = Data.Tuple.snd+ ((GHC.Tuple.(,) BarSym1KindInference) GHC.Tuple.())+ data BarSym1 (l :: Bool) (l :: TyFun Bool Foo)+ = forall arg. SameKind (Apply (BarSym1 l) arg) (BarSym2 l arg) =>+ BarSym1KindInference+ type instance Apply (BarSym1 l) l = Bar l l+ instance SuppressUnusedWarnings BarSym0 where+ suppressUnusedWarnings _+ = Data.Tuple.snd+ ((GHC.Tuple.(,) BarSym0KindInference) GHC.Tuple.())+ data BarSym0 (l :: TyFun Bool (TyFun Bool Foo -> GHC.Types.Type))+ = forall arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>+ BarSym0KindInference+ type instance Apply BarSym0 l = BarSym1 l+ data instance Sing (z :: Bool)+ = z ~ False => SFalse | z ~ True => STrue+ type SBool = (Sing :: Bool -> GHC.Types.Type)+ instance SingKind Bool where+ type Demote Bool = Bool+ fromSing SFalse = False+ fromSing STrue = True+ toSing False = SomeSing SFalse+ toSing True = SomeSing STrue+ data instance Sing (z :: Foo)+ = forall (n :: Bool) (n :: Bool). z ~ Bar n n =>+ SBar (Sing (n :: Bool)) (Sing (n :: Bool))+ type SFoo = (Sing :: Foo -> GHC.Types.Type)+ instance SingKind Foo where+ type Demote Foo = Foo+ fromSing (SBar b b) = (Bar (fromSing b)) (fromSing b)+ toSing (Bar b b)+ = case+ (GHC.Tuple.(,) (toSing b :: SomeSing Bool))+ (toSing b :: SomeSing Bool)+ of {+ GHC.Tuple.(,) (SomeSing c) (SomeSing c) -> SomeSing ((SBar c) c) }+ instance SingI False where+ sing = SFalse+ instance SingI True where+ sing = STrue+ instance (SingI n, SingI n) =>+ SingI (Bar (n :: Bool) (n :: Bool)) where+ sing = (SBar sing) sing+Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| otherwise :: Bool+ otherwise = True+ id :: a -> a+ id x = x+ not :: Bool -> Bool+ not True = False+ not False = True+ false_ = False+ f, g :: Bool -> Bool+ [f, g] = [not, id]+ h, i :: Bool -> Bool+ (h, i) = (f, g)+ j, k :: Bool+ (Bar j k) = Bar True (h False)+ l, m :: Bool+ [l, m] = [not True, id False] |]+ ======>+ otherwise :: Bool+ otherwise = True+ id :: a -> a+ id x = x+ not :: Bool -> Bool+ not True = False+ not False = True+ false_ = False+ f :: Bool -> Bool+ g :: Bool -> Bool+ [f, g] = [not, id]+ h :: Bool -> Bool+ i :: Bool -> Bool+ (h, i) = (f, g)+ j :: Bool+ k :: Bool+ Bar j k = (Bar True) (h False)+ l :: Bool+ m :: Bool+ [l, m] = [not True, id False]+ type family Case_0123456789876543210 a_0123456789876543210 t where+ Case_0123456789876543210 a_0123456789876543210 '[y_0123456789876543210,+ _z_0123456789876543210] = y_0123456789876543210+ type family Case_0123456789876543210 a_0123456789876543210 t where+ Case_0123456789876543210 a_0123456789876543210 '[_z_0123456789876543210,+ y_0123456789876543210] = y_0123456789876543210+ type family Case_0123456789876543210 a_0123456789876543210 t where+ Case_0123456789876543210 a_0123456789876543210 '(y_0123456789876543210,+ _z_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 a_0123456789876543210 t where+ Case_0123456789876543210 a_0123456789876543210 '(_z_0123456789876543210,+ y_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 (Bar y_0123456789876543210 _z_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 (Bar _z_0123456789876543210 y_0123456789876543210) = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 '[y_0123456789876543210,+ _z_0123456789876543210] = y_0123456789876543210+ type family Case_0123456789876543210 t where+ Case_0123456789876543210 '[_z_0123456789876543210,+ y_0123456789876543210] = y_0123456789876543210+ type False_Sym0 = False_+ type NotSym1 (t :: Bool) = Not t+ instance SuppressUnusedWarnings NotSym0 where+ suppressUnusedWarnings _+ = Data.Tuple.snd+ ((GHC.Tuple.(,) NotSym0KindInference) GHC.Tuple.())+ data NotSym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply NotSym0 arg) (NotSym1 arg) =>+ NotSym0KindInference+ type instance Apply NotSym0 l = Not l+ type IdSym1 (t :: a0123456789876543210) = Id t+ instance SuppressUnusedWarnings IdSym0 where+ suppressUnusedWarnings _+ = Data.Tuple.snd ((GHC.Tuple.(,) IdSym0KindInference) GHC.Tuple.())+ data IdSym0 (l :: TyFun a0123456789876543210 a0123456789876543210)+ = forall arg. SameKind (Apply IdSym0 arg) (IdSym1 arg) =>+ IdSym0KindInference+ type instance Apply IdSym0 l = Id l+ type FSym1 (t :: Bool) = F t+ instance SuppressUnusedWarnings FSym0 where+ suppressUnusedWarnings _+ = Data.Tuple.snd ((GHC.Tuple.(,) FSym0KindInference) GHC.Tuple.())+ data FSym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>+ FSym0KindInference+ type instance Apply FSym0 l = F l+ type GSym1 (t :: Bool) = G t+ instance SuppressUnusedWarnings GSym0 where+ suppressUnusedWarnings _+ = Data.Tuple.snd ((GHC.Tuple.(,) GSym0KindInference) GHC.Tuple.())+ data GSym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply GSym0 arg) (GSym1 arg) =>+ GSym0KindInference+ type instance Apply GSym0 l = G l+ type HSym1 (t :: Bool) = H t+ instance SuppressUnusedWarnings HSym0 where+ suppressUnusedWarnings _+ = Data.Tuple.snd ((GHC.Tuple.(,) HSym0KindInference) GHC.Tuple.())+ data HSym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply HSym0 arg) (HSym1 arg) =>+ HSym0KindInference+ type instance Apply HSym0 l = H l+ type ISym1 (t :: Bool) = I t+ instance SuppressUnusedWarnings ISym0 where+ suppressUnusedWarnings _+ = Data.Tuple.snd ((GHC.Tuple.(,) ISym0KindInference) GHC.Tuple.())+ data ISym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply ISym0 arg) (ISym1 arg) =>+ ISym0KindInference+ type instance Apply ISym0 l = I l+ type JSym0 = J+ type KSym0 = K+ type LSym0 = L+ type MSym0 = M+ type OtherwiseSym0 = Otherwise+ type X_0123456789876543210Sym0 = X_0123456789876543210+ type X_0123456789876543210Sym0 = X_0123456789876543210+ type X_0123456789876543210Sym0 = X_0123456789876543210+ type X_0123456789876543210Sym0 = X_0123456789876543210+ type family False_ where+ = FalseSym0+ type family Not (a :: Bool) :: Bool where+ Not True = FalseSym0+ Not False = TrueSym0+ type family Id (a :: a) :: a where+ Id x = x+ type family F (a :: Bool) :: Bool where+ F a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210+ type family G (a :: Bool) :: Bool where+ G a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210+ type family H (a :: Bool) :: Bool where+ H a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210+ type family I (a :: Bool) :: Bool where+ I a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210+ type family J :: Bool where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family K :: Bool where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family L :: Bool where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family M :: Bool where+ = Case_0123456789876543210 X_0123456789876543210Sym0+ type family Otherwise :: Bool where+ = TrueSym0+ type family X_0123456789876543210 where+ = Apply (Apply (:$) NotSym0) (Apply (Apply (:$) IdSym0) '[])+ type family X_0123456789876543210 where+ = Apply (Apply Tuple2Sym0 FSym0) GSym0+ type family X_0123456789876543210 where+ = Apply (Apply BarSym0 TrueSym0) (Apply HSym0 FalseSym0)+ type family X_0123456789876543210 where+ = Apply (Apply (:$) (Apply NotSym0 TrueSym0)) (Apply (Apply (:$) (Apply IdSym0 FalseSym0)) '[])+ sFalse_ :: Sing False_Sym0+ sNot ::+ forall (t :: Bool). Sing t -> Sing (Apply NotSym0 t :: Bool)+ sId :: forall (t :: a). Sing t -> Sing (Apply IdSym0 t :: a)+ sF :: forall (t :: Bool). Sing t -> Sing (Apply FSym0 t :: Bool)+ sG :: forall (t :: Bool). Sing t -> Sing (Apply GSym0 t :: Bool)+ sH :: forall (t :: Bool). Sing t -> Sing (Apply HSym0 t :: Bool)+ sI :: forall (t :: Bool). Sing t -> Sing (Apply ISym0 t :: Bool)+ sJ :: Sing (JSym0 :: Bool)+ sK :: Sing (KSym0 :: Bool)+ sL :: Sing (LSym0 :: Bool)+ sM :: Sing (MSym0 :: Bool)+ sOtherwise :: Sing (OtherwiseSym0 :: Bool)+ sX_0123456789876543210 :: Sing X_0123456789876543210Sym0+ sX_0123456789876543210 :: Sing X_0123456789876543210Sym0+ sX_0123456789876543210 :: Sing X_0123456789876543210Sym0+ sX_0123456789876543210 :: Sing X_0123456789876543210Sym0+ sFalse_ = SFalse+ sNot STrue = SFalse+ sNot SFalse = STrue+ sId (sX :: Sing x) = sX+ sF (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ (case sX_0123456789876543210 of {+ SCons (sY_0123456789876543210 :: Sing y_0123456789876543210)+ (SCons _ SNil)+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))+ sA_0123456789876543210+ sG (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ (case sX_0123456789876543210 of {+ SCons _+ (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) SNil)+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))+ sA_0123456789876543210+ sH (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ (case sX_0123456789876543210 of {+ STuple2 (sY_0123456789876543210 :: Sing y_0123456789876543210) _+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))+ sA_0123456789876543210+ sI (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = (applySing+ (case sX_0123456789876543210 of {+ STuple2 _ (sY_0123456789876543210 :: Sing y_0123456789876543210)+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))+ sA_0123456789876543210+ sJ+ = case sX_0123456789876543210 of {+ SBar (sY_0123456789876543210 :: Sing y_0123456789876543210) _+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)+ sK+ = case sX_0123456789876543210 of {+ SBar _ (sY_0123456789876543210 :: Sing y_0123456789876543210)+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)+ sL+ = case sX_0123456789876543210 of {+ SCons (sY_0123456789876543210 :: Sing y_0123456789876543210)+ (SCons _ SNil)+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)+ sM+ = case sX_0123456789876543210 of {+ SCons _+ (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) SNil)+ -> sY_0123456789876543210 } ::+ Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)+ sOtherwise = STrue+ sX_0123456789876543210+ = (applySing+ ((applySing ((singFun2 @(:$)) SCons)) ((singFun1 @NotSym0) sNot)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons)) ((singFun1 @IdSym0) sId)))+ SNil)+ sX_0123456789876543210+ = (applySing+ ((applySing ((singFun2 @Tuple2Sym0) STuple2))+ ((singFun1 @FSym0) sF)))+ ((singFun1 @GSym0) sG)+ sX_0123456789876543210+ = (applySing ((applySing ((singFun2 @BarSym0) SBar)) STrue))+ ((applySing ((singFun1 @HSym0) sH)) SFalse)+ sX_0123456789876543210+ = (applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @NotSym0) sNot)) STrue)))+ ((applySing+ ((applySing ((singFun2 @(:$)) SCons))+ ((applySing ((singFun1 @IdSym0) sId)) SFalse)))+ SNil)
− tests/compile-and-dump/Singletons/Undef.ghc80.template
@@ -1,51 +0,0 @@-Singletons/Undef.hs:(0,0)-(0,0): Splicing declarations- singletons- [d| foo :: Bool -> Bool- foo = undefined- bar :: Bool -> Bool- bar = error "urk" |]- ======>- foo :: Bool -> Bool- foo = undefined- bar :: Bool -> Bool- bar = error "urk"- type BarSym1 (t :: Bool) = Bar t- instance SuppressUnusedWarnings BarSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) BarSym0KindInference GHC.Tuple.())- data BarSym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply BarSym0 arg) ~ KindOf (BarSym1 arg) =>- BarSym0KindInference- type instance Apply BarSym0 l = BarSym1 l- type FooSym1 (t :: Bool) = Foo t- instance SuppressUnusedWarnings FooSym0 where- suppressUnusedWarnings _- = snd (GHC.Tuple.(,) FooSym0KindInference GHC.Tuple.())- data FooSym0 (l :: TyFun Bool Bool)- = forall arg. KindOf (Apply FooSym0 arg) ~ KindOf (FooSym1 arg) =>- FooSym0KindInference- type instance Apply FooSym0 l = FooSym1 l- type family Bar (a :: Bool) :: Bool where- Bar a_0123456789 = Apply (Apply ErrorSym0 "urk") a_0123456789- type family Foo (a :: Bool) :: Bool where- Foo a_0123456789 = Apply Any a_0123456789- sBar ::- forall (t :: Bool). Sing t -> Sing (Apply BarSym0 t :: Bool)- sFoo ::- forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)- sBar sA_0123456789- = let- lambda ::- forall a_0123456789.- t ~ a_0123456789 =>- Sing a_0123456789 -> Sing (Apply BarSym0 t :: Bool)- lambda a_0123456789 = sError (sing :: Sing "urk")- in lambda sA_0123456789- sFoo sA_0123456789- = let- lambda ::- forall a_0123456789.- t ~ a_0123456789 =>- Sing a_0123456789 -> Sing (Apply FooSym0 t :: Bool)- lambda a_0123456789 = undefined- in lambda sA_0123456789
+ tests/compile-and-dump/Singletons/Undef.ghc82.template view
@@ -0,0 +1,39 @@+Singletons/Undef.hs:(0,0)-(0,0): Splicing declarations+ singletons+ [d| foo :: Bool -> Bool+ foo = undefined+ bar :: Bool -> Bool+ bar = error "urk" |]+ ======>+ foo :: Bool -> Bool+ foo = undefined+ bar :: Bool -> Bool+ bar = error "urk"+ type BarSym1 (t :: Bool) = Bar t+ instance SuppressUnusedWarnings BarSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) BarSym0KindInference) GHC.Tuple.())+ data BarSym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>+ BarSym0KindInference+ type instance Apply BarSym0 l = Bar l+ type FooSym1 (t :: Bool) = Foo t+ instance SuppressUnusedWarnings FooSym0 where+ suppressUnusedWarnings _+ = snd ((GHC.Tuple.(,) FooSym0KindInference) GHC.Tuple.())+ data FooSym0 (l :: TyFun Bool Bool)+ = forall arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>+ FooSym0KindInference+ type instance Apply FooSym0 l = Foo l+ type family Bar (a :: Bool) :: Bool where+ Bar a_0123456789876543210 = Apply (Apply ErrorSym0 "urk") a_0123456789876543210+ type family Foo (a :: Bool) :: Bool where+ Foo a_0123456789876543210 = Apply Any a_0123456789876543210+ sBar ::+ forall (t :: Bool). Sing t -> Sing (Apply BarSym0 t :: Bool)+ sFoo ::+ forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)+ sBar (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = sError (sing :: Sing "urk")+ sFoo (sA_0123456789876543210 :: Sing a_0123456789876543210)+ = undefined