-
Notifications
You must be signed in to change notification settings - Fork 277
Adds punctuation to error messages #1122
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
Conversation
…or messages
A first and obvious solution would be to add However, due to how If there is a different suggestion for how to proceed, please feel free to mention it. |
endSentence :: IsString s => String -> Pretty s | ||
endSentence str = fromString (str ++ ".") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pete-ts I'd do this with:
endSentence :: IsString s => Pretty s -> Pretty s
endSentence p = group (p <> ".")
The group
here will not get broken up when spaces are inserted by wrap
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pchiusano I have a fix with the signature IsString s => Pretty s -> Pretty s
, but that means that the call to P.string
has to happen in the do block and it might look a bit "noisier" than IsString s => String -> Pretty s
, which can get applied without the need to endSentence . string $ dir
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood, and I think that's fine.
Looks great! Can you add yourself to CONTRIBUTORS.markdown as part of this PR? |
😎 merging |
There was no fullstop added after the first sentence in these cases:
ucm
with no codebase initialised in $HOMEucm -codebase x
with no codebase initialised in "x"ucm init
a second time