-
Notifications
You must be signed in to change notification settings - Fork 9
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
Updates to dependencies, and small touchups in wijkanders #128
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.
Looks good to me
@@ -1,5 +1,3 @@ | |||
version: '3.7' |
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.
Good to see this removed as it is now obsolete.
@@ -31,4 +31,4 @@ defaultConfig = Config False 14 (1000000 * 60 * 30) 5007 | |||
-- TODO: Feel free to bikeshed the function name. |
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.
Not enough bikesheding 😉
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.
Tehee ;P
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.
Much better!
src/Config.hs
Outdated
@@ -31,4 +31,4 @@ defaultConfig = Config False 14 (1000000 * 60 * 30) 5007 | |||
-- TODO: Feel free to bikeshed the function name. | |||
reifyConfig | |||
:: ([Config -> Config], [String], [String]) -> (Config, [String], [String]) | |||
reifyConfig = (& _1 %~ foldl' (flip id) defaultConfig) | |||
reifyConfig = _1 %~ foldl' (flip id) defaultConfig |
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.
Out of curiosity: Is it so that the (& ...)
construct doesn't really do anything?
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.
Apparently not, not fully sure why, but HLS complained so I took the Haskell way and got really lazy ;P
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.
Damn legit! Laziness <3
Here, have some types!
λ: :t (&)
(&) :: a -> (a -> b) -> b
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.
Then it makes total sense, since we have the function we want to apply, we just apply it instead
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.
Good stuff! If it typechecks, ship it!
@@ -90,7 +91,7 @@ getWijkanders d = | |||
>>> dropWhile (~/= "<strong>") | |||
>>> removeWhitespaceTags | |||
>>> partitions (~== "<strong>") | |||
>>> mapMaybe ((maybeTagText =<<) . (`atMay` 1)) | |||
>>> mapMaybe (maybeTagText <=< (`atMay` 1)) |
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.
Pretty!
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.
Prima symbolsoppa, LGTM
@@ -31,4 +31,4 @@ defaultConfig = Config False 14 (1000000 * 60 * 30) 5007 | |||
-- TODO: Feel free to bikeshed the function name. |
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.
Much better!
I cannot believe that this wasn't in the thyme library |
Oops, forgot to check, now it works. This would fix #33 |
src/Util.hs
Outdated
| m < 12 = YearMonthDay y (m + 1) (d - len) | ||
| otherwise = YearMonthDay (y + 1) 1 (d - len) |
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.
Couldn't these just set the day to 0?
| m < 12 = YearMonthDay y (m + 1) (d - len) | |
| otherwise = YearMonthDay (y + 1) 1 (d - len) | |
| m < 12 = YearMonthDay y (m + 1) 0 | |
| otherwise = YearMonthDay (y + 1) 1 0 |
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.
Right, these should be 1 but since they are bounded they will bounce up to being a 1
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.
Ohh I was wondering why they were using different bases for months and days, that explains it
Seems like this PR changes multiple completely unrelated things, and that some of the changes might have quite non-obvious implications. Should they really be thought of as a single "conceptual" change? 👀 😊 |
I disagree that a pull request should be seen as a single "conceptual" change. It is one way to approach pull requests, but that is more fit when multiple people are working on the same project at the same time. In this case, it is a project that occasionally gets an update and in this case, I don't see it as problematic, especially since the common way to merge is via rebase. What is your idea about non-obvious implications? The only one I can think of is the overflow of days, which fixes a bug that has been known about for 6 years. |
I went ahead and changed so we don't have the time overflow aspect for this pull request, since it matches the history of the pull request in this repo. |
Merging by rebasing certainly alleviates the problem. It's obviously more difficult to review many changes at once than one at a time, but the history benefits should at least be preserved then. Good to hear that you've thought it through!
I was thinking of the language version, compiler, libraries etc. |
Changing the version is something that I believe is a positive change that will make it easier for others to get into the repo. Last time we did such an update was in #120 where we also removed stack for it to be easier to manage. Having up to date dependencies will also make it easier to manage in the event that there is a breaking change in an update. Not doing incremental updates is one of the reasons that DFoto is in the state that it is (DFoto currently cannot be built). |
src/Model/Wijkanders.hs
Outdated
) | ||
) | ||
(or . ([ | ||
BL.isPrefixOf (BL8.pack "Med reservation") |
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.
Indent?
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.
We love indentation
For the record, I’m all for updating dependencies etc. My suggestion was only about doing it in a separate PR. |
No description provided.