This is to document a consequence of #87 — because of DeepSubsumption and other new extensions, currently the last version of extensions buildable on GHC 9.4.8 is 0.1.0.0.
Versions 0.1.0.1 onwards emit:
src/Extensions/Cabal.hs:393:5: error:
Not in scope: data constructor ‘Cabal.DeepSubsumption’
NB: the module ‘Language.Haskell.Extension’ does not export ‘DeepSubsumption’.
|
393 | Cabal.DeepSubsumption -> Nothing
| ^^^^^^^^^^^^^^^^^^^^^
src/Extensions/Cabal.hs:394:5: error:
Not in scope: data constructor ‘Cabal.TypeData’
NB: the module ‘Language.Haskell.Extension’ does not export ‘TypeData’.
|
394 | Cabal.TypeData -> Nothing
| ^^^^^^^^^^^^^^
and similar errors — because GHC 9.4.8 shipped with Cabal-syntax == 3.8.1.0 which did not name those extensions.
Then, because GHC 9.4.8 is EOL "not recommended for use" — I'm not really asking for any change or support here; @tomjaguarpaw just for your (and others') information.
I could perhaps suggest having empty #else branch here:
|
#if __GLASGOW_HASKELL__ >= 906 |
|
Cabal.DeepSubsumption -> Just DeepSubsumption |
|
Cabal.TypeData -> Just TypeData |
|
#else |
|
Cabal.DeepSubsumption -> Nothing |
|
Cabal.TypeData -> Nothing |
|
#endif |
i.e.
#if __GLASGOW_HASKELL__ >= 906
Cabal.DeepSubsumption -> Just DeepSubsumption
Cabal.TypeData -> Just TypeData
#endif
— IIUC, this'd still give complete case-analysis over all available constructors (in GHC <9.6 / Cabal < 3.10) and avoid compile warnings.
But then again, it's a maintainer decision how far back to keep support.
I think a similar issue would also occur with RequiredTypeArguments & GHC <9.10, due to here:
|
#if __GLASGOW_HASKELL__ >= 910 |
|
-- This branch cannot be satisfied yet but we're including it so |
|
-- we don't forget to enablel RequiredTypeArguments when it |
|
-- becomes available. |
|
Cabal.RequiredTypeArguments -> Just RequiredTypeArguments |
|
#else |
|
Cabal.RequiredTypeArguments -> Nothing |
|
#endif |
@tomjaguarpaw why can't this be with empty #else ?
#if __GLASGOW_HASKELL__ >= 910
-- This branch cannot be satisfied yet but we're including it so
-- we don't forget to enablel RequiredTypeArguments when it
-- becomes available.
Cabal.RequiredTypeArguments -> Just RequiredTypeArguments
#endif
This is to document a consequence of #87 — because of
DeepSubsumptionand other new extensions, currently the last version ofextensionsbuildable on GHC 9.4.8 is0.1.0.0.Versions 0.1.0.1 onwards emit:
and similar errors — because GHC 9.4.8 shipped with
Cabal-syntax == 3.8.1.0which did not name those extensions.Then, because GHC 9.4.8 is
EOL"not recommended for use" — I'm not really asking for any change or support here; @tomjaguarpaw just for your (and others') information.I could perhaps suggest having empty
#elsebranch here:extensions/src/Extensions/Cabal.hs
Lines 389 to 395 in 20142a9
i.e.
— IIUC, this'd still give complete case-analysis over all available constructors (in GHC <9.6 / Cabal < 3.10) and avoid compile warnings.
But then again, it's a maintainer decision how far back to keep support.
I think a similar issue would also occur with
RequiredTypeArguments& GHC <9.10, due to here:extensions/src/Extensions/Cabal.hs
Lines 396 to 403 in 20142a9
@tomjaguarpaw why can't this be with empty
#else?