-
Notifications
You must be signed in to change notification settings - Fork 697
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
Add IsString instance for ShortText newtypes #4229
Conversation
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.
LGTM.
instance IsString ModuleName where | ||
fromString string = fromComponents (split string) | ||
where | ||
split cs = case break (=='.') cs of |
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.
May be worth copying splitOn
from Data.List.Split
to D.S.Utils
.
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.
Let's do it later. This commit just moves as little code as possible
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.
Sure.
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.
Now i remember, splitOn
is quite general reusing other combinators in split
. Also this is less general splitOn' :: a -> [a] -> [[a]]
, where Data.List.Split.splitOn :: [a] -> [a] -> [[a]]
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.
You're right, this is more like Data.List.wordsBy
.
OK! |
Travis failure is genuine:
|
new try |
Ah. cannnot bump |
Resolve #4224