Skip to content

Use coerce instead of unsafeCoerce where appropriate #130

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 7 commits into from
Nov 26, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove 'usage of this constructor...' sentence
  • Loading branch information
JordanMartinez committed Nov 26, 2020
commit 0157801c98f0c25b4e42f517eab6bd7a1d4e3a1e
4 changes: 1 addition & 3 deletions src/Data/String/NonEmpty/Internal.purs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ newtype NonEmptyString =
-- | You can use this constructor to create a NonEmptyString that isn't
Copy link
Member

Choose a reason for hiding this comment

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

*NonEmptyString (with backticks)?

-- | non-empty, breaking the guarantee behind this newtype. It is
-- | provided as an escape hatch mainly for the `Data.NonEmpty.CodeUnits`
-- | and `Data.NonEmpty.CodePoints` modules. Usage of this constructor
-- | in your own code provides the same safety guarantees of
-- | `unsafeCoerce`, that is, none at all. Use this at your own risk
-- | and `Data.NonEmpty.CodePoints` modules. Use this at your own risk
-- | when you know what you are doing.
NonEmptyString String

Expand Down