Skip to content

Import Data.Array.ST instead of Data.Array.ST.Safe - #970

Draft
konsumlamm wants to merge 2 commits into
haskell:masterfrom
konsumlamm:array-safe
Draft

Import Data.Array.ST instead of Data.Array.ST.Safe#970
konsumlamm wants to merge 2 commits into
haskell:masterfrom
konsumlamm:array-safe

Conversation

@konsumlamm

Copy link
Copy Markdown
Contributor

Data.Array.ST exports the same things as Data.Array.ST.Safe, the latter was just added as a migration strategy. The *.Safe modules in array might get deprecated in the future, see https://gitlab.haskell.org/ghc/packages/array/-/issues/11.

@treeowl

treeowl commented Sep 27, 2023

Copy link
Copy Markdown
Contributor

There seems to be an incorrect assumption somewhere; CI is failing.

@konsumlamm

Copy link
Copy Markdown
Contributor Author

Yes, Data.Array.ST.Safe is marked as Trustworthy, while Data.Array.ST is not. This makes it fail, because Data.Graph is marked as Safe.

The next step would be to mark Data.Array.ST as Trustworthy.

@konsumlamm
konsumlamm marked this pull request as draft September 27, 2023 13:46
@meooow25

meooow25 commented Oct 1, 2023

Copy link
Copy Markdown
Contributor

On Hackage I can see that Data.Array.ST is "Safe-Inferred" 0.5.5.0 onwards. This is included in GHC 9.6. Doesn't that mean it should compile fine without any changes with GHC 9.6 and above?

@meooow25

Copy link
Copy Markdown
Contributor

Hi @konsumlamm, I'm wondering if we want to finish this.

The next step would be to mark Data.Array.ST as Trustworthy.

Alternately we can just mark Data.Graph as Trustworthy and resolve it here on the containers side. I think that would be fine.

@konsumlamm
konsumlamm force-pushed the array-safe branch 2 times, most recently from 0ac4aab to a4da2f8 Compare August 30, 2026 12:06
@konsumlamm

Copy link
Copy Markdown
Contributor Author

I marked Data.Graph as trustworthy for array < 0.5.7.0 (for array >= 0.5.7.0, it's inferred as safe).

@meooow25

Copy link
Copy Markdown
Contributor

Thanks! I would be fine with not having the CPP and making it always Trustworthy. Or does GHC complain if that's the case?

@konsumlamm

Copy link
Copy Markdown
Contributor Author

Thanks! I would be fine with not having the CPP and making it always Trustworthy. Or does GHC complain if that's the case?

That makes the CI fail due to -Werror, since it's inferred as safe on newer versions.

@meooow25 meooow25 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that's a bit annoying, let's keep it like this then.

I think you need to mark the PR as non-draft before I can merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants