The example that is given in the Haddocks for how to use KindSigOptions is not terribly helpful:
|
* 'KindSigOptions': By default, all derived instances will use explicit kind |
|
signatures (when the 'KindSigOptions' is 'True'). You might wish to set the |
|
'KindSigOptions' to 'False' if you want a 'Generic'/'Generic1' instance at |
|
a particular kind that GHC will infer correctly, but the functions in this |
|
module won't guess correctly. For example, the following example will only |
|
compile with 'KindSigOptions' set to 'False': |
|
|
|
@ |
|
newtype Compose (f :: k2 -> *) (g :: k1 -> k2) (a :: k1) = Compose (f (g a)) |
|
$('deriveAll1Options' 'defaultOptions'{'kindSigOptions' = False} ''Compose) |
|
@ |
Even if you generate code without explicit kind annotations in that example, it won't kind-check anyway due to other TH limitations mentioned here. If KindSigOptions isn't useful here, where is it useful? There are no examples in the test suite that make use of it, and I can't recall exactly why I needed it in the first place. We should either:
- Come up with an example where
kindSigOptions = False is needed and document it, or
- Failing that, perhaps deprecate and/or remove
KindSigOptions.
The example that is given in the Haddocks for how to use
KindSigOptionsis not terribly helpful:generic-deriving/src/Generics/Deriving/TH.hs
Lines 128 to 138 in e858579
Even if you generate code without explicit kind annotations in that example, it won't kind-check anyway due to other TH limitations mentioned here. If
KindSigOptionsisn't useful here, where is it useful? There are no examples in the test suite that make use of it, and I can't recall exactly why I needed it in the first place. We should either:kindSigOptions = Falseis needed and document it, orKindSigOptions.