-
-
Notifications
You must be signed in to change notification settings - Fork 195
pov: Improve code based on HLint's suggestions. #371
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
where reparented = reparent (Zipper (crumbToGraph c) cs) | ||
|
||
down :: Zipper a -> Maybe (Zipper a) | ||
down (Zipper (Graph v (k:kids)) crumbs) = Just (Zipper k ((Crumb v [] kids):crumbs)) | ||
down (Zipper (Graph v (k:kids)) crumbs) = Just (Zipper k (Crumb v [] kids:crumbs)) |
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.
Do you think the spacing now makes it look deceptive? It makes it look as if the precedence is Crumb v [] (kids:crumbs)
, perhaps a space surrounding the :
would be fitting? What say you?
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.
I agree!
Gonna fix as soon as possible.
ps: Sorry for taking so long to answer. I'm temporarily with a very slow Internet connection (It takes at least a minute to load a GitHub page)
down _ = Nothing | ||
|
||
right :: Zipper a -> Maybe (Zipper a) | ||
right (Zipper here ((Crumb v lefts (r:rights)):cs)) = Just (Zipper r (shifted:cs)) | ||
right (Zipper here (Crumb v lefts (r:rights):cs)) = Just (Zipper r (shifted:cs)) |
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.
same question with the space here, I think
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.
I rewrote both lines, adding spaces and substituting parenthesis by $
.
I still don't like how it looks, but I expect it to be a little more readable.
Related to #355.