Missing Enum instance for IoSubSystem

Tom Ellis tom-lists-haskell-cafe-2023 at jaguarpaw.co.uk
Wed Dec 4 10:44:13 UTC 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/85b0f87a298c8e54b06a8f8c6ce88669c5cad3bc#f7c61f967f2b5c4951224837ae809183449da146_116_105
> > 
> > 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/1adc6fa43e0c2f577c15f560d767c7af9eec2c04#2ca7b1d6bb24cd05ca30a428efb924268c8dbc51_11689_11690

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


More information about the ghc-devs mailing list