[#301] Add traceShowWith#303
Merged
chshersh merged 2 commits intokowainik:masterfrom Jun 5, 2020
sushi-shi:301-add-traceShowWith
Merged
[#301] Add traceShowWith#303chshersh merged 2 commits intokowainik:masterfrom sushi-shi:301-add-traceShowWith
chshersh merged 2 commits intokowainik:masterfrom
sushi-shi:301-add-traceShowWith
Conversation
vrom911
reviewed
Jun 4, 2020
Member
vrom911
left a comment
There was a problem hiding this comment.
Nicely done, @sheepfleece 👍
I have only one suggestion to improve the example 🙂
Comment on lines
+128
to
+130
| >>> fst $ traceShowWith fst (1, id) | ||
| 1 | ||
| 1 |
Member
There was a problem hiding this comment.
Nice example! But I think that it would make the meaning of the traceShowWith function even clearer if we won't use fst on the result
Suggested change
| >>> fst $ traceShowWith fst (1, id) | |
| 1 | |
| 1 | |
| >>> traceShowWith fst (1, "ABC") | |
| 1 | |
| (1,"ABC") |
Contributor
Author
There was a problem hiding this comment.
Ah, but with this I wanted to explicitly point out that you can use this function on things which do not have Show instance.
Member
There was a problem hiding this comment.
You can add the second example as well if you wish, but for the more clear picture of this function, it makes sense to show it in the way I mentioned above as well.
Contributor
Author
There was a problem hiding this comment.
Added both examples.
chshersh
approved these changes
Jun 5, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #301
Checklist:
HLint
hlint.dhallaccordingly to my changes (add new rules for the new imports, remove old ones, when they are outdated, etc.)..hlint.yamlfile (see this instructions).General
stylish-haskellfile.[ci skip]text to the docs-only related commit's name.