Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following up to #372 and #407, consider a snippet
Produces deprecation warning:
I've read the documented deprecations, and I fully understand the motivating blog post of Mr. Snoyberg.
However, those locale concerns simply don't apply here. Because I'm writing code to read a guaranteed small file that's nearly guaranteed to never exceed the 12-character alphabet
0123456789 \n
.So then, can I silence the deprecation warning on this specific use-site? No — all deprecations over the entire module only.
Sigh... 😔 Sure, writing yet another little helper once more is far from hard:
And everybody is doing that already anyway. Yet by this same reasoning, the entire
Relude.File
module is redundant.Constructively: I'm proposing a function:
which:
String.Conversions
module,readFileUtf8Text
,readFileUtf8LText
,readFileUtf8String
elegantly.I'll add lazy version on demand.
Checklist:
HLint
— new API, no need for hlint changes.
General
stylish-haskell
file.[ci skip]
text to the docs-only related commit's name.