Skip to content

Remove some usages of unsafeCoerce #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 25, 2020

Conversation

kl0tl
Copy link
Member

@kl0tl kl0tl commented Nov 19, 2020

This pull request replace some usages of unsafeCoerce, not by coerce like I suggested in #181 (comment) but by matching on and applying the NonEmptyArray constructor itself as done in purescript/purescript-strings#130. I also adapted the comments from the other pull request.

@@ -1,4 +1,7 @@
module Data.Array.NonEmpty.Internal (NonEmptyArray) where
-- | This module exports the `NonEmptyArray` constructor, which can be
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be worth discouraging this module’s use a bit more, by adding a disclaimer that this module is not intended for public use and its API may change at any time, and a breaking change won’t be reflected in the version number?

Copy link
Member Author

@kl0tl kl0tl Nov 20, 2020

Choose a reason for hiding this comment

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

What do you think of this, with some bold all caps and newlines to let the disclaimer breath:

Capture d’écran 2020-11-20 à 09 18 48

It could be nice of Pursuit to display a warning on internal modules, so we can have some CSS on top and we don’t have to synchronize them across packages.

Copy link
Contributor

@hdgarrood hdgarrood left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@thomashoneyman thomashoneyman merged commit bf70fb9 into purescript:master Nov 25, 2020
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