Skip to content
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

Fix #460; for introduces a bound variable #462

Merged
merged 1 commit into from
May 30, 2016
Merged

Fix #460; for introduces a bound variable #462

merged 1 commit into from
May 30, 2016

Conversation

albertnetymk
Copy link
Contributor

No description provided.

@kikofernandez
Copy link
Contributor

@albertnetymk I would suggest that you add a bit of info to your PRs. A link to the issue is good, but what did you do to fix it? What is the error? How did you fix it? It feels like I need to look into the code to understand what is going on

@PhucVH888
Copy link
Contributor

I agree. I have no clues with your PR.

@kikofernandez kikofernandez self-assigned this May 27, 2016
@kikofernandez
Copy link
Contributor

this commit could have been super-simple to review if it had been split into two, meaningful changes and removing one level of indentation 😒 . The fact that indentation was removed, even though it's nice, adds lots of noise to the whole function, which looks as if it was completely new.

@EliasC
Copy link
Contributor

EliasC commented May 29, 2016

@kikofernandez: Once again I highly recommend hiding changes to whitespace:

https://github.com/parapluu/encore/pull/462/files?w=1

@kikofernandez
Copy link
Contributor

@EliasC I always forget about that flag. In any case, if you use that you would not be able to see any change when programming in the Whitespace language... 😶

fvDecls (x, expr) (free, bound) =
(freeVariables' (x:bound) expr ++ free, x:bound)
freeVariables' bound e@For{name, step, src, body} =
concatMap (freeVariables' (name:bound)) $ getChildren e
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may I suggest this other form (I think it looks more Haskelly and cleaner):

freeVariables' (name:bound) =<< getChildren e

@kikofernandez
Copy link
Contributor

@EliasC I just saw that, while using the ?w=1, I cannot put in-line comments

@kikofernandez
Copy link
Contributor

waiting for @albertnetymk or any other person to reply the only comment and merging afterwards

@EliasC
Copy link
Contributor

EliasC commented May 30, 2016

@kikofernandez: That is a downside, but at least it makes browsing simpler!

@albertnetymk
Copy link
Contributor Author

Replaced concatMap with =<< in the new added code. According to the signature of concatMap and =<<, it seems that we could do the replacement all the time.

@kikofernandez
Copy link
Contributor

yes! I noticed that as well!
Merging PR in 15 min

@kikofernandez kikofernandez merged commit 8248229 into parapluu:development May 30, 2016
@kikofernandez kikofernandez deleted the fix-closure-freevar branch May 30, 2016 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants