Missing Enum instance for IoSubSystem

Hi all, In ghc 9.12-alpha the Enum instance for IoSubSystem no longer exists. I don't see this change mentioned anywhere in the docs (release notes/changelog) here: https://downloads.haskell.org/ghc/9.12.1-alpha1/docs/users_guide/9.12.1-note... Was this change intended or was it a refactoring issue? The datatype itself was moved from GHC.Internal.RTS.Flags to GHC.Internal.IO.SubSystem. The enum instance was earlier defined in GHC.Internal.RTS.Flags but now isn't defined in either of the modules. Best, Adithya

As a core libraries committee member I can say this was probably not intentional (at least, I wouldn't have voted for it). Perhaps it is related to: https://github.com/haskell/core-libraries-committee/issues/289 But the situation is strange, because it seems like the instance was removed in 2022: https://gitlab.haskell.org/ghc/ghc/-/commit/85b0f87a298c8e54b06a8f8c6ce88669... So I don't understand why it still seems to exist in base-4.20.0.1: https://hackage.haskell.org/package/base-4.20.0.1/docs/GHC-RTS-Flags.html#t:... and why the source location still seems to contain it: https://hackage.haskell.org/package/ghc-internal-9.1001.0/docs/src/GHC.Inter... Tom On Wed, Dec 04, 2024 at 03:06:39PM +0530, Adithya Kumar wrote:
Hi all,
In ghc 9.12-alpha the Enum instance for IoSubSystem no longer exists. I don't see this change mentioned anywhere in the docs (release notes/changelog) here: https://downloads.haskell.org/ghc/9.12.1-alpha1/docs/users_guide/9.12.1-note...
Was this change intended or was it a refactoring issue?
The datatype itself was moved from GHC.Internal.RTS.Flags to GHC.Internal.IO.SubSystem.
The enum instance was earlier defined in GHC.Internal.RTS.Flags but now isn't defined in either of the modules.
Best, Adithya
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

But the situation is strange, because it seems like the instance was removed in 2022:
https://gitlab.haskell.org/ghc/ghc/-/commit/85b0f87a298c8e54b06a8f8c6ce88669...
So I don't understand why it still seems to exist in base-4.20.0.1:
That patch only landed in April 2024

On Wed, Dec 04, 2024 at 03:47:06PM +0530, Zubin Duggal wrote:
But the situation is strange, because it seems like the instance was removed in 2022:
https://gitlab.haskell.org/ghc/ghc/-/commit/85b0f87a298c8e54b06a8f8c6ce88669...
So I don't understand why it still seems to exist in base-4.20.0.1:
That patch only landed in April 2024
Ah, that would explain it. Is there a way of seeing in the repo the commit from which a release was made? I don't see any tags corresponding to released versions (although I do see ghc-9.7-start, ghc-9.9-start, etc.). Tom

You can see the branches and tags the commit was a part of. For this commit, that is the branches ghc-9.12 and master and the tags ghc-9.12.1-alpha1 ghc-9.12.1-alpha2 ghc-9.12.1-alpha3 ghc-9.12.1-rc1 ghc-9.13-start So this commit hasn't made it into any release yet and will be first released in GHC 9.12 On 24/12/04 10:21, Tom Ellis wrote:
On Wed, Dec 04, 2024 at 03:47:06PM +0530, Zubin Duggal wrote:
But the situation is strange, because it seems like the instance was removed in 2022:
https://gitlab.haskell.org/ghc/ghc/-/commit/85b0f87a298c8e54b06a8f8c6ce88669...
So I don't understand why it still seems to exist in base-4.20.0.1:
That patch only landed in April 2024
Ah, that would explain it. Is there a way of seeing in the repo the commit from which a release was made? I don't see any tags corresponding to released versions (although I do see ghc-9.7-start, ghc-9.9-start, etc.).
Tom
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

On Wed, Dec 04, 2024 at 04:00:03PM +0530, Zubin Duggal wrote:
You can see the branches and tags the commit was a part of. For this commit, that is the branches ghc-9.12 and master and the tags ghc-9.12.1-alpha1 ghc-9.12.1-alpha2 ghc-9.12.1-alpha3 ghc-9.12.1-rc1 ghc-9.13-start
Ah, it seems I needed to do `git fetch --tags` to get all the tags. Thanks, Tom

On Wed, Dec 04, 2024 at 03:47:06PM +0530, Zubin Duggal wrote:
But the situation is strange, because it seems like the instance was removed in 2022:
https://gitlab.haskell.org/ghc/ghc/-/commit/85b0f87a298c8e54b06a8f8c6ce88669...
So I don't understand why it still seems to exist in base-4.20.0.1:
That patch only landed in April 2024
There is test in place to confirm that the API of base does not change accidentally. The test correctly caught the removal of this instance: https://gitlab.haskell.org/ghc/ghc/-/commit/1adc6fa43e0c2f577c15f560d767c7af... Howewer, the commit was nontheless merged with the commit message
Accept changes to base-exports
All the changes are in fact not changes at all.
Previously, the IoSubSystem data type was defined in GHC.RTS.Flags and exported from both GHC.RTS.Flags and GHC.IO.SubSystem. Now, the data type is defined in GHC.IO.SubSystem and still exported from both modules.
Therefore, the same exports and same instances are still available from both modules.
In retrospect, that sounds incorrect, doesn't it? (I believe we now rule out https://github.com/haskell/core-libraries-committee/issues/289 as implicated) Tom

On Wed, Dec 04, 2024 at 10:44:13AM +0000, Tom Ellis wrote:
There is test in place to confirm that the API of base does not change accidentally. [...]
Just so everyone here is in the loop: My guess is that the CLC will consider this an unapproved change that should be reverted before release. I don't speak here officially for the CLC in this matter (despite being one of seven CLC members) but I have brought this matter to the attention of the rest of the committee in the below ticket, and the above is my best guess at what their opinion on the matter will be. https://github.com/haskell/core-libraries-committee/issues/311 Tom
participants (3)
-
Adithya Kumar
-
Tom Ellis
-
Zubin Duggal